| 501 | }; |
| 502 | |
| 503 | class StdSort : public CppBenchmark::Benchmark, public SortFixture |
| 504 | { |
| 505 | public: |
| 506 | using Benchmark::Benchmark; |
| 507 | |
| 508 | protected: |
| 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 | |
| 520 | BENCHMARK_CLASS(SelectionSort, "SelectionSort", Settings().Param(slow_size)) |
| 521 | BENCHMARK_CLASS(BubbleSort, "BubbleSort", Settings().Param(slow_size)) |
nothing calls this directly
no outgoing calls
no test coverage detected