1
0
mirror of https://github.com/google/benchmark.git synced 2025-04-29 06:20:32 +08:00

remove unneeded includes

This commit is contained in:
Eric Fiselier 2015-03-12 18:45:52 -04:00
parent 937987b63d
commit 2b34b5d937
2 changed files with 26 additions and 31 deletions
include/benchmark
src

View File

@ -138,12 +138,8 @@ BENCHMARK(BM_MultiThreaded)->Threads(4);
#include <cassert>
#include <cstdint>
#include <functional>
#include <memory>
#include <string>
#include <thread>
#include <vector>
#include <mutex>
#include "macros.h"

View File

@ -327,8 +327,6 @@ static std::unique_ptr<TimerManager> timer_manager = nullptr;
namespace internal {
class BenchmarkFamilies;
// Information kept per benchmark we may want to run
struct Benchmark::Instance {
std::string name;
@ -341,6 +339,30 @@ struct Benchmark::Instance {
bool multithreaded; // Is benchmark multi-threaded?
};
// Class for managing registered benchmarks. Note that each registered
// benchmark identifies a family of related benchmarks to run.
class BenchmarkFamilies {
public:
static BenchmarkFamilies* GetInstance();
// Registers a benchmark family and returns the index assigned to it.
size_t AddBenchmark(BenchmarkImp* family);
// Unregisters a family at the given index.
void RemoveBenchmark(size_t index);
// Extract the list of benchmark instances that match the specified
// regular expression.
bool FindBenchmarks(const std::string& re,
std::vector<Benchmark::Instance>* benchmarks);
private:
BenchmarkFamilies();
~BenchmarkFamilies();
std::vector<BenchmarkImp*> families_;
Mutex mutex_;
};
class BenchmarkImp {
public:
@ -367,33 +389,10 @@ private:
std::vector< std::pair<int, int> > args_; // Args for all benchmark runs
std::vector<int> thread_counts_;
std::size_t registration_index_;
BENCHMARK_DISALLOW_COPY_AND_ASSIGN(BenchmarkImp);
};
// Class for managing registered benchmarks. Note that each registered
// benchmark identifies a family of related benchmarks to run.
class BenchmarkFamilies {
public:
static BenchmarkFamilies* GetInstance();
// Registers a benchmark family and returns the index assigned to it.
size_t AddBenchmark(BenchmarkImp* family);
// Unregisters a family at the given index.
void RemoveBenchmark(size_t index);
// Extract the list of benchmark instances that match the specified
// regular expression.
bool FindBenchmarks(const std::string& re,
std::vector<Benchmark::Instance>* benchmarks);
private:
BenchmarkFamilies();
~BenchmarkFamilies();
std::vector<BenchmarkImp*> families_;
Mutex mutex_;
};
BenchmarkFamilies* BenchmarkFamilies::GetInstance() {
static BenchmarkFamilies instance;
return &instance;