def main(): """Displays topdown hierarchy for localhost""" parser = argparse.ArgumentParser(description='Top down micro architecture analysis') parser.add_argument('--node', type=str, help='list pmu events for node - enter "all" to list events for all nodes') args = parser.parse_args() topdownCache = TopdownCache(EventsDbCache()) from xpedite.util import getCpuId topdownHandle = topdownCache.get(getCpuId()) if args.node: LOGGER.info('%s', topdownHandle.nodesToString(args.node)) return LOGGER.info('%s', topdownHandle.hierarchy)
def getCpuId(self): """Discovers and caches cpu model""" if not self.cpuId: from xpedite.util import getCpuId self.cpuId = getCpuId() return self.cpuId
def main(): """Displays pmu events database for localhost""" from xpedite.util import getCpuId eventsDb = loadEventsDb(getCpuId()) LOGGER.info('\n%s', eventsDb)