| 738 | } |
| 739 | |
| 740 | void SetCommandLineCounters(benchmark::State& state, size_t total_input_bytes, |
| 741 | double total_load_ms, double total_convert_ms, |
| 742 | double total_write_ms, double total_total_ms) { |
| 743 | const double throughput = |
| 744 | total_total_ms > 0.0 |
| 745 | ? (static_cast<double>(total_input_bytes) / 1000000.0) / |
| 746 | (total_total_ms / 1000.0) |
| 747 | : 0.0; |
| 748 | const double iterations = static_cast<double>(state.iterations()); |
| 749 | state.counters["Throughput"] = benchmark::Counter(throughput); |
| 750 | state.counters["LoadMs"] = benchmark::Counter(total_load_ms / iterations); |
| 751 | state.counters["ConvertMs"] = |
| 752 | benchmark::Counter(total_convert_ms / iterations); |
| 753 | state.counters["WriteMs"] = benchmark::Counter(total_write_ms / iterations); |
| 754 | state.counters["TotalMs"] = benchmark::Counter(total_total_ms / iterations); |
| 755 | } |
| 756 | |
| 757 | std::string ReadText(const std::string& filename) { |
| 758 | const std::string benchmark_data_dir = PROJECT_SOURCE_DIR "/test/benchmark/"; |
no test coverage detected