-
Notifications
You must be signed in to change notification settings - Fork 117
[feat] Add support for logging all performance variables to a single line #1545
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feat] Add support for logging all performance variables to a single line #1545
Conversation
|
Can I test this patch? |
Codecov Report
@@ Coverage Diff @@
## master #1545 +/- ##
==========================================
+ Coverage 87.90% 87.97% +0.06%
==========================================
Files 43 43
Lines 6848 6862 +14
==========================================
+ Hits 6020 6037 +17
+ Misses 828 825 -3
Continue to review full report at Codecov.
|
vkarak
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @stevenvdb, thanks for your PR. Instead of having the different check_perf_all_* format specifiers, I was wondering wether it would make more sense to have a single one, say check_perf_data that would actually print all performance variables and values at once as key value pairs. Something like this:
perfX=valX[unitX],perfY=valY[unitY],...
We could even have check_perf_data_fmt (similarly to datefmt) that would allow users to explicitly specify the perf data format that they want based on the existing check_perf_* values. This will allow to even log check_perf_data as JSON:
'check_perf_data_fmt': '{"perfvar": %(check_perf_var)s, "value": %(check_perf_value)s, ...}'|
@stevenvdb After merging #1600 and #1644, we will no more need the |
|
Also if you need a different formatting of the performance variables, you can define an arbitrary field in your test and log that always. In this case, we probably need to find another way to force logging of performance data to happen only once. |
Your proposition sounds good, the |
|
@stevenvdb Sorry for getting back to you late. I was quite busy and then I can't figure out which is the best way to handle this :-) First of all, I think that the logic of whether to iterate or not over the performance variables should be moved inside the |
|
Hi @stevenvdb, #1816 allows you also to log all the references in a single line, so now you can have |
Hi @vkarak, That sounds look a good solution to me, thanks. I will close this PR. |
This PR introduces log record attributes such as
%(check_perf_all_values)sthat will be filled in with a comma-separated list of values from all entries inperf_patterns. When the existing log record attributes such as%(check_perf_value)sare omitted, this changes the existing behavior that a separate line is logged for each entry inper_patterns.Closes #1543