content/test/gpu/gpu_tests/ipg_utils.py
def _ScrapeDataFromIPGLogFiles():
    """Scrapes data from IPG log files.

    Returns:
      A tuple (per_core_results, metrics). |output| is a dictionary containing
      per-core results extracted from the IPG log files. |metrics| is a
      dictionary mapping metrics found in the logs to all found data points.
    """
    per_core_results = {}
    metrics = {}
    for logfile in logfiles:
      results = AnalyzeIPGLogFile(logfile, skip_in_seconds)
      results['log'] = logfile
      (_, filename) = os.path.split(logfile)
      (core, _) = os.path.splitext(filename)
      prefix = 'PowerLog_'
      if core.startswith(prefix):
        core = core[len(prefix):]
      per_core_results[core] = results

      for key in results:
        if key == 'samples' or key == 'log':
          continue
        metrics.setdefault(key, []).append(results[key])
    return per_core_results, metrics
Scrapes data from IPG log files.

    Returns:
      A tuple (per_core_results, metrics). |output| is a dictionary containing
      per-core results extracted from the IPG log files. |metrics| is a
      dictionary mapping metrics found in the logs to all found data points.
    
Scrapes data from IPG log files.
Scrapes data from IPG log files .
def _ScrapeDataFromIPGLogFiles():
    per_core_results = {}
    metrics = {}
    for logfile in logfiles:
      results = AnalyzeIPGLogFile(logfile, skip_in_seconds)
      results['log'] = logfile
      (_, filename) = os.path.split(logfile)
      (core, _) = os.path.splitext(filename)
      prefix = 'PowerLog_'
      if core.startswith(prefix):
        core = core[len(prefix):]
      per_core_results[core] = results
      for key in results:
        if key == 'samples' or key == 'log':
          continue
        metrics.setdefault(key, []).append(results[key])
    return per_core_results, metrics
def _ScrapeDataFromIPGLogFiles ( ) : per_core_results = { } metrics = { } for logfile in logfiles : results = AnalyzeIPGLogFile ( logfile , skip_in_seconds ) results [ 'log' ] = logfile ( _ , filename ) = os . path . split ( logfile ) ( core , _ ) = os . path . splitext ( filename ) prefix = 'PowerLog_' if core . startswith ( prefix ) : core = core [ len ( prefix ) : ] per_core_results [ core ] = results for key in results : if key == 'samples' or key == 'log' : continue metrics . setdefault ( key , [ ] ) . append ( results [ key ] ) return per_core_results , metrics
Scrapes data from IPG log files.
Scrapes data from IPG log files .
"""Scrapes data from IPG log files.

    Returns:
      A tuple (per_core_results, metrics). |output| is a dictionary containing
      per-core results extracted from the IPG log files. |metrics| is a
      dictionary mapping metrics found in the logs to all found data points.
    """
A tuple (per_core_results, metrics). |output| is a dictionary containing
per-core results extracted from the IPG log files. |metrics| is a
dictionary mapping metrics found in the logs to all found data points.
A tuple ( per_core_results metrics ) . |output| is a dictionary containing per - core results extracted from the IPG log files . |metrics| is a dictionary mapping metrics found in the logs to all found data points .