def profile_vendor_genvmap(vobj, name): """ This function profiles vendor map file generation for the given vendor. This corresponds to the execution profile for searching for a part from the vendor. .. warning:: Make sure that your cache already includes all the necessary files by first running the ``tendril-genvmaps`` script before running the profiler. """ map.gen_vendor_mapfile(vobj)
def run(vobj=None): """ Generates vendor maps for the provided vendor. :param vobj: Vendor to generate the map for, or None for all. """ from tendril.sourcing.map import gen_vendor_mapfile from tendril.sourcing.electronics import vendor_list if not vobj: for v in vendor_list: gen_vendor_mapfile(v) else: gen_vendor_mapfile(vobj)
def run(vobj=None, force=False, lazy=False): """ Generates vendor maps for the provided vendor. :param vobj: Vendor to generate the map for, or None for all. """ from tendril.sourcing.map import gen_vendor_mapfile from tendril.sourcing.electronics import vendor_list maxage = -1 if force is True: maxage = 0 if lazy is True: maxage = -1 if not vobj: for v in vendor_list: gen_vendor_mapfile(v, maxage) else: gen_vendor_mapfile(vobj, maxage)