コード例 #1
0
 def makeXpediteDormantApp(self, runId, workspace, sampleFilePath=None):
   """
   Create an Xpedite dormant app (dry run without enabling probes)
   """
   from xpedite.profiler.app import XpediteDormantApp
   appInfo = os.path.join(
     self.dataDir, XPEDITE_APP_INFO_PARAMETER_PATH
   ) if sampleFilePath else os.path.join(self.tempDir, XPEDITE_APP_INFO_PATH)
   if sampleFilePath:
     xpediteApp = XpediteDormantApp(self.appName, LOCALHOST, appInfo, runId, workspace=workspace)
     xpediteApp.sampleFilePath = sampleFilePath
     return xpediteApp
   appHost = self.remote.host if self.remote else LOCALHOST
   return XpediteDormantApp(self.appName, appHost, appInfo, runId, workspace=workspace)
コード例 #2
0
ファイル: __init__.py プロジェクト: zeta1999/Xpedite
  def report(profileInfoPath, runId=None, dataSourcePath=None, benchmarkPath=None, cprofile=None,
      profileName=None, verbose=None):
    """
    Generates report for a previous profiling runs

    :param profileInfoPath: Path to profile info module
    :type profileInfoPath: str
    :param runId: Unique identifier for a previous run
    :type runId: str
    :param dataSourcePath: Path to load txn data for reporting
    :param benchmarkPath: Path to persist profile data for benchmarking
    :type benchmarkPath: str
    :param cprofile: Handle to capture self profile Xpedite report generation code (Default value = None)
    :type cprofile: C{xpedite.selfProfile.CProfile}
    :param profileName: Name of the profile report
    :type profileName: str
    :param verbose: Flag to enable, verbose logging
    :type verbose: bool
    """
    if verbose:
      enableVerboseLogging()
    profileInfo = loadProfileInfo(profileInfoPath)
    validateBenchmarkPath(benchmarkPath)
    app = XpediteDormantApp(profileInfo.appName, profileInfo.appHost, profileInfo.appInfo,
        runId=runId, dataSourcePath=dataSourcePath)
    with app:
      reportName = buildReportName(profileInfo.appName, profileName)
      report = Profiler.profile(app, profileInfo, reportName, benchmarkPath, True, cprofile=cprofile)
    return profileInfo, report
コード例 #3
0
ファイル: profile.py プロジェクト: kelliott55/Xpedite
def runXpediteReport(runId, profileInfo, dataFilePath=None):
    """
  Run xpedite report

  @param dataFilePath: File path to override an app's sample file path
  to a data file in the test data directory
  """
    from xpedite.profiler.app import XpediteDormantApp
    xpediteApp = XpediteDormantApp(profileInfo.appName, profileInfo.appHost,
                                   profileInfo.appInfo, runId)
    if dataFilePath:
        xpediteApp.sampleFilePath = dataFilePath
    xpediteApp.start()
    reportProfiles, result = generateProfiles(xpediteApp, profileInfo)
    xpediteApp.stop()
    return reportProfiles, result
コード例 #4
0
    def report(profileInfoPath,
               runId,
               benchmarkPath=None,
               cprofile=None,
               profileName=None,
               verbose=None,
               result=None):
        """
    Generates report for a previous profiling runs

    :param profileInfoPath: Path to profile info module
    :type profileInfoPath: str
    :param runId: Unique identifier for a previous run
    :type runId: str
    :param benchmarkPath: Path to persist profile data for benchmarking
    :type benchmarkPath: str
    :param cprofile: Handle to capture self profile Xpedite report generation code (Default value = None)
    :type cprofile: C{xpedite.selfProfile.CProfile}
    :param profileName: Name of the profile report
    :type profileName: str
    :param verbose: Flag to enable, verbose logging
    :type verbose: bool
    :param result: Object for gathering and storing profile results
    :type result: xpedite.jupyter.result.Result
    """
        if verbose:
            enableVerboseLogging()
        profileInfo = loadProfileInfo(profileInfoPath)
        validateBenchmarkPath(benchmarkPath)
        app = XpediteDormantApp(profileInfo.appName, profileInfo.appHost,
                                profileInfo.appInfo, runId)
        with app:
            from xpedite.jupyter.result import Result
            result = result if result else Result()
            reportName = buildReportName(profileInfo.appName, profileName)
            Profiler.profile(app,
                             profileInfo,
                             reportName,
                             benchmarkPath,
                             True,
                             result,
                             cprofile=cprofile)
        return profileInfo, result
コード例 #5
0
ファイル: profile.py プロジェクト: xwlan/Xpedite
def runXpediteReport(runId,
                     profileInfo,
                     sampleFilePath=None,
                     cpuInfo=None,
                     workspace=None):
    """
  Run xpedite report

  @param dataFilePath: File path to override an app's sample file path
  to a data file in the test data directory
  """
    from xpedite.profiler.app import XpediteDormantApp
    xpediteApp = XpediteDormantApp(profileInfo.appName, profileInfo.appHost,
                                   profileInfo.appInfo, runId, workspace)
    if sampleFilePath:
        xpediteApp.sampleFilePath = sampleFilePath
    xpediteApp.start()
    if cpuInfo:
        xpediteApp.env.proxy.fullCpuInfo = cpuInfo
    result = generateProfiles(xpediteApp, profileInfo)
    xpediteApp.stop()
    return result