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

Class StdSort

examples/sort.cpp:503–518  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

501};
502
503class StdSort : public CppBenchmark::Benchmark, public SortFixture
504{
505public:
506 using Benchmark::Benchmark;
507
508protected:
509 void Run(CppBenchmark::Context& context) override
510 {
511 // Generate items to sort
512 std::generate(items.begin(), items.end(), rand);
513
514 // Sort items
515 std::sort(items.begin(), items.end());
516 context.metrics().AddItems(items.size());
517 }
518};
519
520BENCHMARK_CLASS(SelectionSort, "SelectionSort", Settings().Param(slow_size))
521BENCHMARK_CLASS(BubbleSort, "BubbleSort", Settings().Param(slow_size))

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected