def _loadProbes(app): """Attaches to application and loads probe data""" from xpedite.profiler.probeAdmin import ProbeAdmin try: with app: pingApp(app) return ProbeAdmin.loadProbes(app) except Exception as _: return list(app.appInfo.probes.values())
def loadProbes(binary, profileInfo, txnCount, threadCount, remote=None, workspace=None): """ Generate a probe map to test the state of application probes """ with TargetLauncher(binary, profileInfo, txnCount, threadCount, workspace, remote) as app: return ProbeAdmin.loadProbes(app.xpediteApp)
def test_generate_cmd_vs_baseline(scenarioName): """ Test xpedite generate by generating a new profileInfo.py file and comparing to baseline profileInfo.py in the test data directory """ from test_xpedite.test_profiler.app import TargetLauncher from xpedite.profiler.probeAdmin import ProbeAdmin with SCENARIO_LOADER[scenarioName] as scenarios: with TargetLauncher(CONTEXT, scenarios) as app: probes = ProbeAdmin.loadProbes(app.xpediteApp) profileInfoFile = generateProfileInfoFile(app.xpediteApp, probes) generatedProfileInfo = loadProfileInfo('', profileInfoFile) (generatedProfileInfo.benchmarkPaths, generatedProfileInfo.cpuSet, generatedProfileInfo.pmc) = (None, None, None) findDiff(generatedProfileInfo.__dict__, scenarios.baselineProfileInfo.__dict__) assert generatedProfileInfo == scenarios.baselineProfileInfo
def generateProfileInfo(binary, profileInfo, remote): """ Use Xpedite's profile information generator to generate a new profileInfo.py file for an xpedite application and compare the new profile information to baseline profile information """ from xpedite.profiler.profileInfoGenerator import ProfileInfoGenerator with TargetLauncher(binary, profileInfo, remote) as app: probes = ProbeAdmin.loadProbes(app.xpediteApp) profiler = os.path.join(os.path.dirname(testDir), 'scripts/bin/xpedite') profileInfo.appInfo = os.path.join(app.tempDir, 'xpedite-appinfo.txt') generator = ProfileInfoGenerator(app.xpediteApp.getBinaryName(), profileInfo.appHost, os.path.basename(profileInfo.appInfo), probes, profiler) generator.generate() return generator.filePath
def loadProbes(context, scenario): """ Generate a probe map to test the state of application probes """ with TargetLauncher(context, scenario) as app: return ProbeAdmin.loadProbes(app.xpediteApp)
def _loadProbes(app): """Attaches to application and loads probe data""" with app: pingApp(app) from xpedite.profiler.probeAdmin import ProbeAdmin return ProbeAdmin.loadProbes(app)