Skip to content
Snippets Groups Projects
Commit a3ef8fb6 authored by Sergey Bronnikov's avatar Sergey Bronnikov Committed by Sergey Kaplun
Browse files

perf/lua: add context section to test output

Google Benchmark output format contains a section "context" that
describes useful information about test environment.

Google Benchmark output format has been supported in Lua
microbenchmarks in commit 3110ef9a
("perf: introduce benchmark.lua helper module"). However, produced
output contains test results only and section "context" is missed.
The patch add a section "context" with the following fields:
date, load average, hostname, tarantool's version, build flags
and a name of build target.

```
$ tarantool uri_escape_unescape.lua --output=res.json --output_format=json
$ jq ".context" res.json
{
  "build_target": "Linux-x86_64-RelWithDebInfo",
  "host_name": "pony",
  "date": "2024-07-04 19:09:11",
  "tarantool_version": "3.2.0-entrypoint-114-g9e5dca29ad",
  "build_flags": " -fexceptions -funwind-tables -fasynchronous-unwind-tables -fno-common -msse2 -Wformat -Wformat-security -Werror=format-security -fstack-protector-strong -fPIC -fmacro-prefix-map=/home/sergeyb/sources/MRG/tarantool=. -std=c11 -Wall -Wextra -Wno-gnu-alignof-expression -Wno-cast-function-type -O2 -g -DNDEBUG -ggdb -O2 ",
  "load_avg": [
    "0.76",
    "0.74",
    "0.63"
  ]
}
```

NO_CHANGELOG=perf
NO_DOC=perf
NO_TEST=perf
parent 18661ed7
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment