MCPcopy Create free account
hub / github.com/apache/impala / main

Function main

be/src/benchmarks/status-benchmark.cc:137–164  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

135
136
137int main(int argc, char** argv) {
138 CpuInfo::Init();
139 cout << Benchmark::GetMachineInfo() << endl;
140
141 data d = {true};
142
143 Benchmark suite("status");
144 int baseline = suite.AddBenchmark("Call Status::OK()", TestCallOK, &d, -1);
145 suite.AddBenchmark("Call static Status::Error", TestCallStaticError, &d, baseline);
146 suite.AddBenchmark("Call Status(Code, 'string')", TestCallCreateError, &d, baseline);
147 suite.AddBenchmark("Call w/ Assignment", TestCallAssignment, &d, baseline);
148
149 d.good = true;
150 suite.AddBenchmark("Call Cond Branch OK", TestCallCondBranch, &d, baseline);
151 d.good = false;
152 suite.AddBenchmark("Call Cond Branch ERROR", TestCallCondBranch, &d, baseline);
153
154 d.good = false;
155 suite.AddBenchmark("Call Cond Branch Bool (false)", TestCallCondBool, &d, baseline);
156 d.good = true;
157 suite.AddBenchmark("Call Cond Branch Bool (true)", TestCallCondBool, &d, baseline);
158 d.good = true;
159 suite.AddBenchmark("Call Cond Boost Optional (true)", TestCallOptional, &d, baseline);
160 d.good = false;
161 suite.AddBenchmark("Call Cond Boost Optional (false)", TestCallOptional, &d, baseline);
162
163 cout << suite.Measure() << endl;
164}

Callers

nothing calls this directly

Calls 2

AddBenchmarkMethod · 0.80
MeasureMethod · 0.45

Tested by

no test coverage detected