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

Function BM_ConvertLongText

src/benchmark/Performance.cpp:775–783  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

773}
774
775static void BM_ConvertLongText(benchmark::State& state,
776 const BenchmarkConfig& config) {
777 const std::string text = ReadText("zuozhuan.txt");
778 const std::unique_ptr<SimpleConverter> converter(Initialize(config));
779 for (auto _ : state) {
780 Convert(converter.get(), text);
781 }
782 SetThroughputCounter(state, text.size());
783}
784
785static void BM_Convert(benchmark::State& state, const BenchmarkConfig& config,
786 int iteration) {

Callers 1

RegisterBenchmarksFunction · 0.85

Calls 6

ReadTextFunction · 0.85
ConvertFunction · 0.85
SetThroughputCounterFunction · 0.85
InitializeFunction · 0.70
getMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected