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

Function main

be/src/benchmarks/bitmap-benchmark.cc:147–184  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

145} // namespace bitmapget
146
147int main(int argc, char **argv) {
148 CpuInfo::Init();
149 cout << endl << Benchmark::GetMachineInfo() << endl;
150
151 char name[120];
152
153 {
154 Benchmark suite("initialize");
155 for (int64_t size = 1000; size <= 1000 * 1000 * 1000; size *= 10) {
156 int64_t* d = new int64_t(size);
157 snprintf(name, sizeof(name), "size %10ld", size);
158 suite.AddBenchmark(name, bitmapinitialize::Benchmark, d);
159 }
160 cout << suite.Measure() << endl;
161 }
162
163 {
164 Benchmark suite("set");
165 for (int64_t size = 1000; size <= 1000 * 1000 * 1000; size *= 10) {
166 bitmapset::TestData* d = new bitmapset::TestData(size);
167 snprintf(name, sizeof(name), "size %10ld", size);
168 suite.AddBenchmark(name, bitmapset::Benchmark, d);
169 }
170 cout << suite.Measure() << endl;
171 }
172
173 {
174 Benchmark suite("get");
175 for (int64_t size = 1000; size <= 1000 * 1000 * 1000; size *= 10) {
176 bitmapget::TestData* d = new bitmapget::TestData(size);
177 snprintf(name, sizeof(name), "size %10ld", size);
178 suite.AddBenchmark(name, bitmapget::Benchmark, d);
179 }
180 cout << suite.Measure() << endl;
181 }
182
183 return 0;
184}

Callers

nothing calls this directly

Calls 2

AddBenchmarkMethod · 0.80
MeasureMethod · 0.45

Tested by

no test coverage detected