tools/perf/cli_tools/pinboard/pinboard.py
def FindCommit(before_date=None, after_date=None):
  """Find latest commit with optional before/after date constraints."""
  cmd = ['git', 'log', '--max-count', '1', '--format=format:%H:%ct']
  if before_date is not None:
    cmd.extend(['--before', before_date.isoformat()])
  if after_date is not None:
    cmd.extend(['--after', after_date.isoformat()])
  cmd.append('origin/master')
  line = subprocess.check_output(cmd, cwd=TOOLS_PERF_DIR).strip()
  if line:
    revision, commit_time = line.split(':')
    commit_time = pd.Timestamp(
        int(commit_time), unit='s', tz=TZ).isoformat()
    return revision, commit_time
  else:
    return None
Find latest commit with optional before/after date constraints.
Find latest commit with optional before/after date constraints.
Find latest commit with optional before / after date constraints .
def FindCommit(before_date=None, after_date=None):
  cmd = ['git', 'log', '--max-count', '1', '--format=format:%H:%ct']
  if before_date is not None:
    cmd.extend(['--before', before_date.isoformat()])
  if after_date is not None:
    cmd.extend(['--after', after_date.isoformat()])
  cmd.append('origin/master')
  line = subprocess.check_output(cmd, cwd=TOOLS_PERF_DIR).strip()
  if line:
    revision, commit_time = line.split(':')
    commit_time = pd.Timestamp(
        int(commit_time), unit='s', tz=TZ).isoformat()
    return revision, commit_time
  else:
    return None
def FindCommit ( before_date = None , after_date = None ) : cmd = [ 'git' , 'log' , '--max-count' , '1' , '--format=format:%H:%ct' ] if before_date is not None : cmd . extend ( [ '--before' , before_date . isoformat ( ) ] ) if after_date is not None : cmd . extend ( [ '--after' , after_date . isoformat ( ) ] ) cmd . append ( 'origin/master' ) line = subprocess . check_output ( cmd , cwd = TOOLS_PERF_DIR ) . strip ( ) if line : revision , commit_time = line . split ( ':' ) commit_time = pd . Timestamp ( int ( commit_time ) , unit = 's' , tz = TZ ) . isoformat ( ) return revision , commit_time else : return None
Find latest commit with optional before/after date constraints.
Find latest commit with optional before / after date constraints .
"""Find latest commit with optional before/after date constraints."""
before_date
after_date