MCPcopy Create free account
hub / github.com/BYVoid/OpenCC / SetThroughputCounter

Function SetThroughputCounter

src/benchmark/Performance.cpp:732–738  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

730};
731
732void SetThroughputCounter(benchmark::State& state, size_t bytes_per_iteration) {
733 const double total_megabytes =
734 static_cast<double>(state.iterations()) *
735 static_cast<double>(bytes_per_iteration) / 1000000.0;
736 state.counters["Throughput"] =
737 benchmark::Counter(total_megabytes, benchmark::Counter::kIsRate);
738}
739
740void SetCommandLineCounters(benchmark::State& state, size_t total_input_bytes,
741 double total_load_ms, double total_convert_ms,

Callers 2

BM_ConvertLongTextFunction · 0.85
BM_ConvertFunction · 0.85

Calls 2

iterationsMethod · 0.80
CounterClass · 0.50

Tested by

no test coverage detected