MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / process_test_logs

Function process_test_logs

tensorflow/tools/test/run_and_gather_logs_lib.py:51–86  ·  view source on GitHub ↗

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. benchmark_type: A string representing the BenchmarkType

(name, test_name, test_args, benchmark_type,
                      start_time, run_time, log_files)

Source from the content-addressed store, hash-verified

49
50
51def process_test_logs(name, test_name, test_args, benchmark_type,
52 start_time, run_time, log_files):
53 """Gather test information and put it in a TestResults proto.
54
55 Args:
56 name: Benchmark target identifier.
57 test_name: A unique bazel target, e.g. "//path/to:test"
58 test_args: A string containing all arguments to run the target with.
59 benchmark_type: A string representing the BenchmarkType enum; the
60 benchmark type for this target.
61 start_time: Test starting time (epoch)
62 run_time: Wall time that the test ran for
63 log_files: Paths to the log files
64
65 Returns:
66 A TestResults proto
67 """
68
69 results = test_log_pb2.TestResults()
70 results.name = name
71 results.target = test_name
72 results.start_time = start_time
73 results.run_time = run_time
74 results.benchmark_type = test_log_pb2.TestResults.BenchmarkType.Value(
75 benchmark_type.upper())
76
77 # Gather source code information
78 git_sha = get_git_commit_sha()
79 if git_sha:
80 results.commit_id.hash = git_sha
81
82 results.entries.CopyFrom(process_benchmarks(log_files))
83 results.run_configuration.argument.extend(test_args)
84 results.machine_configuration.CopyFrom(
85 system_info_lib.gather_machine_configuration())
86 return results
87
88
89def process_benchmarks(log_files):

Callers 1

run_and_gather_logsFunction · 0.85

Calls 5

get_git_commit_shaFunction · 0.85
process_benchmarksFunction · 0.85
ValueMethod · 0.45
CopyFromMethod · 0.45
extendMethod · 0.45

Tested by

no test coverage detected