diff options
author | Jatin Chaudhary <ndjatin@gmail.com> | 2018-12-11 16:53:02 +0530 |
---|---|---|
committer | Dominic Hamon <dominichamon@users.noreply.github.com> | 2018-12-11 11:23:02 +0000 |
commit | 47a5f77d754892f20b8c717ead26de836e0bb552 (patch) | |
tree | 228c4c27e89bf563cb4717a909a5399e3b4803cd /include/benchmark | |
parent | 1f3cba06e4f50bc35aa24941b58ae41fc2ada40e (diff) | |
download | google-benchmark-47a5f77d754892f20b8c717ead26de836e0bb552.tar.gz |
#722 Adding Host Name in Reporting (#733)
* Adding Host Name and test
* Addressing Review Comments
* Adding Test for JSON Reporter
* Adding HOST_NAME_MAX for MacOS systems
* Adding Explaination for MacOS HOST_NAME_MAX Addition
* Addressing Peer Review Comments
* Adding codecvt in windows header guard
* Changing name SystemInfo and adding empty message incase host name fetch fails
* Adding Comment on Struct SystemInfo
Diffstat (limited to 'include/benchmark')
-rw-r--r-- | include/benchmark/benchmark.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/benchmark/benchmark.h b/include/benchmark/benchmark.h index 1f072b1..a0fd7c6 100644 --- a/include/benchmark/benchmark.h +++ b/include/benchmark/benchmark.h @@ -1293,6 +1293,15 @@ struct CPUInfo { BENCHMARK_DISALLOW_COPY_AND_ASSIGN(CPUInfo); }; +//Adding Struct for System Information +struct SystemInfo { + std::string name; + static const SystemInfo& Get(); + private: + SystemInfo(); + BENCHMARK_DISALLOW_COPY_AND_ASSIGN(SystemInfo); +}; + // Interface for custom benchmark result printers. // By default, benchmark reports are printed to stdout. However an application // can control the destination of the reports by calling @@ -1302,6 +1311,7 @@ class BenchmarkReporter { public: struct Context { CPUInfo const& cpu_info; + SystemInfo const& sys_info; // The number of chars in the longest benchmark name. size_t name_field_width; static const char* executable_name; |