MCPcopy Create free account
hub / github.com/chronoxor/CppBenchmark / Run

Method Run

examples/sort.cpp:314–323  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

312
313protected:
314 void Run(CppBenchmark::Context& context) override
315 {
316 // Generate items to sort
317 std::generate(items.begin(), items.end(), rand);
318
319 // Sort items
320 if (items.size() > 0)
321 QuickSortInternal(items, 1, items.size());
322 context.metrics().AddItems(items.size());
323 }
324
325private:
326 static void QuickSortInternal(std::vector<int>& subitems, size_t left, size_t right)

Callers

nothing calls this directly

Calls 1

AddItemsMethod · 0.80

Tested by

no test coverage detected