⬆️ 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:
parent
daeb48b01a
commit
06731b14d7
76 changed files with 2828 additions and 341 deletions
10
benchmarks/thirdparty/benchmark/src/json_reporter.cc
vendored
Normal file → Executable file
10
benchmarks/thirdparty/benchmark/src/json_reporter.cc
vendored
Normal file → Executable 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";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue