benchmark/test
Brian Wolfe 99c52f1414
use rfc3339-formatted timestamps in output [output format change] (#965)
* timestamp: use rfc3339-formatted timestamps in output

Replace localized timestamps with machine-readable IETF RFC 3339 format
timestamps. This is an attempt to make the output timestamps easily
machine-readable. ISO8601 specifies standards for time interchange
formats. IETF RFC 3339: https://tools.ietf.org/html/rfc3339 defines a
subset of these for use in the internet. The general form for these
timestamps is:

YYYY-MM-DDTHH:mm:SS[+-]hhmm

This replaces the localized time formats that are currently being used
in the benchmark output to prioritize interchangeability and
machine-readability.

This might break existing programs that rely on the particular date-time
format. This might also may make times less human readable. RFC3339 was
intended to balance human readability and simplicity for machine
readability, but it is primarily intended as an internal representation.

* timers: remove utc string formatting

We only ever need local time printing. Remove the UTC printing
and cosnolidate the logic slightly.

* timers: manually create rfc3339 string

The C++ standard library does not output the time offset in RFC3339
format, it is missing the : between hours and minutes. VS does not
appear to support timezone information by default. To avoid adding too
much complexity to benchmark around timezone handling e.g. a full
date library like https://github.com/HowardHinnant/date, we fall back
to outputting GMT time with a -00:00 offset for those cases.

* timers: use reentrant form for localtime_r & tmtime_r

For non-windows, use the reentrant form for the time conversion
functions.

* timers: cleanup

Use strtol instead of brittle moving characters around.

* timers: only call strftime twice.

Also size buffers to known maximum necessary size and name constants
more appropriately.

* timers: fix unused variable warning
2020-06-15 17:28:17 +01:00
..
AssemblyTests.cmake split_list is not defined for assembly tests (#595) 2018-05-14 15:02:49 +01:00
basic_test.cc Iteration counts should be uint64_t globally. (#817) 2019-05-13 12:33:11 +03:00
benchmark_gtest.cc Negative ranges #762 (#787) 2019-03-26 10:50:53 +00:00
benchmark_name_gtest.cc BENCHMARK_CAPTURE() and Complexity() - naming problem (#761) 2019-03-17 16:38:51 +03:00
benchmark_test.cc Allow AddRange to work with int64_t. (#548) 2018-04-03 23:12:47 +01:00
BUILD Switch to Starlark for C++ rules. (#887) 2019-10-08 11:09:51 +01:00
clobber_memory_assembly_test.cc Add tests to verify assembler output -- Fix DoNotOptimize. (#530) 2018-03-23 16:10:47 -06:00
CMakeLists.txt Fix cxx03 standard selection, option override in CMake 3.13+. Fixes #933 (#934) 2020-01-31 10:16:25 +00:00
commandlineflags_gtest.cc Read options from environment (#881) (#883) 2019-10-23 11:07:08 +03:00
complexity_test.cc Bugfix/wsl selftest fixes. Fixes #839 (#843) 2019-07-27 19:02:31 +03:00
cxx03_test.cc Iteration counts should be uint64_t globally. (#817) 2019-05-13 12:33:11 +03:00
diagnostics_test.cc Refactor most usages of KeepRunning to use the perfered ranged-for. (#459) 2017-10-17 12:17:02 -06:00
display_aggregates_only_test.cc Track two more details about runs - the aggregate name, and run name. (#675) 2018-09-13 15:08:15 +03:00
donotoptimize_assembly_test.cc Add tests to verify assembler output -- Fix DoNotOptimize. (#530) 2018-03-23 16:10:47 -06:00
donotoptimize_test.cc Fix uninitialized warning (#560) 2018-03-25 20:05:31 +01:00
filter_test.cc Refactor most usages of KeepRunning to use the perfered ranged-for. (#459) 2017-10-17 12:17:02 -06:00
fixture_test.cc Enforce using a semicolon after BENCHMARK_MAIN to remove compiler warnings (#495) 2017-12-03 18:45:07 -07:00
internal_threading_test.cc Add process_time for better OpenMP and user-managed thread timing 2019-04-09 13:01:33 +01:00
link_main_test.cc Add benchmark_main target. (#601) 2018-05-25 11:18:58 +01:00
map_test.cc Allow AddRange to work with int64_t. (#548) 2018-04-03 23:12:47 +01:00
memory_manager_test.cc [JSON] add threads and repetitions to the json output (#748) 2019-03-26 09:53:07 +00:00
multiple_ranges_test.cc Negative ranges #762 (#787) 2019-03-26 10:50:53 +00:00
options_test.cc Negative ranges #762 (#787) 2019-03-26 10:50:53 +00:00
output_test_helper.cc Remove warnings for internal use of CSVReporter (#956) 2020-04-14 10:20:22 +01:00
output_test.h *Display* aggregates only. (#665) 2018-09-12 16:26:17 +03:00
register_benchmark_test.cc Track two more details about runs - the aggregate name, and run name. (#675) 2018-09-13 15:08:15 +03:00
report_aggregates_only_test.cc Track two more details about runs - the aggregate name, and run name. (#675) 2018-09-13 15:08:15 +03:00
reporter_output_test.cc use rfc3339-formatted timestamps in output [output format change] (#965) 2020-06-15 17:28:17 +01:00
skip_with_error_test.cc Relax CHECK condition in benchmark_runner.cc (#938) 2020-02-21 17:53:25 +03:00
state_assembly_test.cc Iteration counts should be uint64_t globally. (#817) 2019-05-13 12:33:11 +03:00
statistics_gtest.cc Fix type conversion warnings. (#951) 2020-04-06 13:52:09 +01:00
string_util_gtest.cc Guard ASSERT_THROWS checks with BENCHMARK_HAS_NO_EXCEPTIONS (#874) 2019-09-20 10:25:31 +01:00
templated_fixture_test.cc (clang-)format all the things (#610) 2018-06-01 11:14:19 +01:00
user_counters_tabular_test.cc Bugfix/wsl selftest fixes. Fixes #839 (#843) 2019-07-27 19:02:31 +03:00
user_counters_test.cc Custom user counters: add invert modifier. (#850) 2019-08-12 17:47:46 +03:00
user_counters_thousands_test.cc [JSON] add threads and repetitions to the json output (#748) 2019-03-26 09:53:07 +00:00