diff options
author | 2017-08-11 10:50:50 -0700 | |
---|---|---|
committer | 2017-08-11 10:54:14 -0700 | |
commit | 5d1792f994624f37dbe1da01d17b6ac23f11953d (patch) | |
tree | 3bcf0b5b05bf82e38def599ac61cf98aefa61214 /tensorflow/tools/benchmark/benchmark_model_test.cc | |
parent | 8d75705ffa7afa259a7e7d2aa9b7f05a559d4602 (diff) |
benchmark_model: add optional inter-benchmark delay and max benchmark length params to help reduce effects of thermal throttling and standardize run-length between graphs.
PiperOrigin-RevId: 164996768
Diffstat (limited to 'tensorflow/tools/benchmark/benchmark_model_test.cc')
-rw-r--r-- | tensorflow/tools/benchmark/benchmark_model_test.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tensorflow/tools/benchmark/benchmark_model_test.cc b/tensorflow/tools/benchmark/benchmark_model_test.cc index ee7f24c0cf..c8deeb3625 100644 --- a/tensorflow/tools/benchmark/benchmark_model_test.cc +++ b/tensorflow/tools/benchmark/benchmark_model_test.cc @@ -62,8 +62,11 @@ TEST(BenchmarkModelTest, InitializeAndRun) { std::unique_ptr<StatSummarizer> stats; stats.reset(new tensorflow::StatSummarizer(*(loaded_graph_def.get()))); int64 time; + int64 num_runs; TF_ASSERT_OK(benchmark_model::TimeMultipleRuns( - 0.0, 10, {input}, {output_name}, session.get(), stats.get(), &time)); + 0.0, 10, 0.0, {input}, {output_name}, session.get(), stats.get(), &time, + &num_runs)); + ASSERT_EQ(num_runs, 10); } } // namespace |