tools/perf/cli_tools/soundwave/tables/timeseries_test.py
def SamplePoint(point_id, value, timestamp=None, missing_commit_pos=False):
  """Build a sample point as returned by timeseries2 API."""
  revisions = {
      'r_commit_pos': str(point_id),
      'r_chromium': 'chromium@%d' % point_id,
  }
  annotations = {
      'a_tracing_uri': 'http://example.com/trace/%d' % point_id
  }

  if timestamp is None:
    timestamp = datetime.datetime.utcfromtimestamp(
        1234567890 + 60 * point_id).isoformat()
  if missing_commit_pos:
    # Some data points have a missing commit position.
    revisions['r_commit_pos'] = None
  return [
      point_id,
      revisions,
      value,
      timestamp,
      annotations,
  ]
Build a sample point as returned by timeseries2 API.
Build a sample point as returned by timeseries2 API.
Build a sample point as returned by timeseries2 API .
def SamplePoint(point_id, value, timestamp=None, missing_commit_pos=False):
  revisions = {
      'r_commit_pos': str(point_id),
      'r_chromium': 'chromium@%d' % point_id,
  }
  annotations = {
      'a_tracing_uri': 'http://example.com/trace/%d' % point_id
  }
  if timestamp is None:
    timestamp = datetime.datetime.utcfromtimestamp(
        1234567890 + 60 * point_id).isoformat()
  if missing_commit_pos:
    revisions['r_commit_pos'] = None
  return [
      point_id,
      revisions,
      value,
      timestamp,
      annotations,
  ]
def SamplePoint ( point_id , value , timestamp = None , missing_commit_pos = False ) : revisions = { 'r_commit_pos' : str ( point_id ) , 'r_chromium' : 'chromium@%d' % point_id , } annotations = { 'a_tracing_uri' : 'http://example.com/trace/%d' % point_id } if timestamp is None : timestamp = datetime . datetime . utcfromtimestamp ( 1234567890 + 60 * point_id ) . isoformat ( ) if missing_commit_pos : revisions [ 'r_commit_pos' ] = None return [ point_id , revisions , value , timestamp , annotations , ]
Build a sample point as returned by timeseries2 API.
Build a sample point as returned by timeseries2 API .
"""Build a sample point as returned by timeseries2 API.""" # Some data points have a missing commit position.
point_id
value
timestamp
missing_commit_pos