Ejemplo n.º 1
0
def process_test_logs(name, test_name, test_args, start_time, run_time,
                      log_files):
    """Gather test information and put it in a TestResults proto.

  Args:
    name: Benchmark target identifier.
    test_name:  A unique bazel target, e.g. "//path/to:test"
    test_args:  A string containing all arguments to run the target with.

    start_time: Test starting time (epoch)
    run_time:   Wall time that the test ran for
    log_files:  Paths to the log files

  Returns:
    A TestResults proto
  """

    results = test_log_pb2.TestResults()
    results.name = name
    results.target = test_name
    results.start_time = start_time
    results.run_time = run_time

    # Gather source code information
    git_sha = get_git_commit_sha()
    if git_sha:
        results.commit_id.hash = git_sha

    results.entries.CopyFrom(process_benchmarks(log_files))
    results.run_configuration.argument.extend(test_args)
    results.machine_configuration.CopyFrom(
        system_info_lib.gather_machine_configuration())
    return results
Ejemplo n.º 2
0
def process_test_logs(test_name, test_args, start_time, run_time, log_files):
  """Gather test information and put it in a TestResults proto.

  Args:
    test_name:  A unique bazel target, e.g. "//path/to:test"
    test_args:  A string containing all arguments to run the target with.

    start_time: Test starting time (epoch)
    run_time:   Wall time that the test ran for
    log_files:  Paths to the log files

  Returns:
    A TestResults proto
  """

  results = test_log_pb2.TestResults()
  results.target = test_name
  results.start_time = start_time
  results.run_time = run_time

  # Gather source code information
  git_sha = get_git_commit_sha()
  if git_sha:
    results.commit_id.hash = git_sha

  results.entries.CopyFrom(process_benchmarks(log_files))
  results.run_configuration.argument.extend(test_args)
  results.machine_configuration.CopyFrom(
      system_info_lib.gather_machine_configuration())
  return results
Ejemplo n.º 3
0
def process_test_logs(test_name, test_args, start_time, run_time, log_files):
    results = test_log_pb2.TestResults()
    results.target = test_name
    results.start_time = start_time
    results.run_time = run_time
    results.entries.CopyFrom(process_benchmarks(log_files))
    results.run_configuration.argument.extend(test_args)
    results.machine_configuration.CopyFrom(
        system_info_lib.gather_machine_configuration())
    return results
def process_test_logs(test_name, test_args, start_time, run_time, log_files):
  results = test_log_pb2.TestResults()
  results.target = test_name
  results.start_time = start_time
  results.run_time = run_time
  results.entries.CopyFrom(process_benchmarks(log_files))
  results.run_configuration.argument.extend(test_args)
  results.machine_configuration.CopyFrom(
      system_info_lib.gather_machine_configuration())
  return results
Ejemplo n.º 5
0
def main(unused_args):
    config = system_info_lib.gather_machine_configuration()
    print(config)
Ejemplo n.º 6
0
def main(unused_args):
  config = system_info_lib.gather_machine_configuration()
  print(config)