예제 #1
0
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())
예제 #2
0
파일: profile.py 프로젝트: xwlan/Xpedite
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)
예제 #3
0
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
예제 #4
0
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
예제 #5
0
파일: profile.py 프로젝트: ywong587/Xpedite
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)
예제 #6
0
def _loadProbes(app):
    """Attaches to application and loads probe data"""
    with app:
        pingApp(app)
        from xpedite.profiler.probeAdmin import ProbeAdmin
        return ProbeAdmin.loadProbes(app)