/*
- * Copyright 2017 Facebook, Inc.
+ * Copyright 2012-present Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
using TimeIterPair =
std::pair<std::chrono::high_resolution_clock::duration, unsigned int>;
+using BenchmarkFun = std::function<detail::TimeIterPair(unsigned int)>;
+
+struct BenchmarkRegistration {
+ std::string file;
+ std::string name;
+ BenchmarkFun func;
+};
+
+struct BenchmarkResult {
+ std::string file;
+ std::string name;
+ double timeInNs;
+};
/**
* Adds a benchmark wrapped in a std::function. Only used
#endif
+struct dynamic;
+
+void benchmarkResultsToDynamic(
+ const std::vector<detail::BenchmarkResult>& data,
+ dynamic&);
+
+void benchmarkResultsFromDynamic(
+ const dynamic&,
+ std::vector<detail::BenchmarkResult>&);
+
+void printResultComparison(
+ const std::vector<detail::BenchmarkResult>& base,
+ const std::vector<detail::BenchmarkResult>& test);
+
} // namespace folly
/**