MCPcopy Create free account
hub / github.com/catboost/catboost / BenchFormatStream

Function BenchFormatStream

util/datetime/benchmark/format/main.cpp:21–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19};
20
21Y_FORCE_INLINE static void BenchFormatStream(auto&& formatFn, benchmark::State& state) {
22 TTimestampGenerator gen;
23 TStringStream ss;
24 for (auto _ : state) {
25 ss << formatFn(gen());
26 Y_DO_NOT_OPTIMIZE_AWAY(ss.Str());
27 ss.clear();
28 }
29}
30
31Y_FORCE_INLINE static void BenchToString(auto&& toStringFn, benchmark::State& state) {
32 TTimestampGenerator gen;

Callers 2

BM_FormatIsoLocalFunction · 0.85
BM_FormatLocalFunction · 0.85

Calls 3

genFunction · 0.85
StrMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected