⬆️ upgraded Catch and Google Benchmark

- Catch 1.12.0 -> 1.12.2
- Google Benchmark 1.3.0 -> 1.4.1
This commit is contained in:
Niels Lohmann 2019-01-13 11:29:39 +01:00
parent daeb48b01a
commit 06731b14d7
No known key found for this signature in database
GPG key ID: 7F3CEA63AE251B69
76 changed files with 2828 additions and 341 deletions

10
benchmarks/thirdparty/benchmark/src/json_reporter.cc vendored Normal file → Executable file
View file

@ -32,15 +32,15 @@ namespace benchmark {
namespace {
std::string FormatKV(std::string const& key, std::string const& value) {
return StringPrintF("\"%s\": \"%s\"", key.c_str(), value.c_str());
return StrFormat("\"%s\": \"%s\"", key.c_str(), value.c_str());
}
std::string FormatKV(std::string const& key, const char* value) {
return StringPrintF("\"%s\": \"%s\"", key.c_str(), value);
return StrFormat("\"%s\": \"%s\"", key.c_str(), value);
}
std::string FormatKV(std::string const& key, bool value) {
return StringPrintF("\"%s\": %s", key.c_str(), value ? "true" : "false");
return StrFormat("\"%s\": %s", key.c_str(), value ? "true" : "false");
}
std::string FormatKV(std::string const& key, int64_t value) {
@ -77,6 +77,10 @@ bool JSONReporter::ReportContext(const Context& context) {
std::string walltime_value = LocalDateTimeString();
out << indent << FormatKV("date", walltime_value) << ",\n";
if (Context::executable_name) {
out << indent << FormatKV("executable", Context::executable_name) << ",\n";
}
CPUInfo const& info = context.cpu_info;
out << indent << FormatKV("num_cpus", static_cast<int64_t>(info.num_cpus))
<< ",\n";