Skip to content
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

Simple output improvements (also make simple output format default) #519

Merged
merged 6 commits into from
Apr 28, 2022

Conversation

roman-kruglov
Copy link
Contributor

@roman-kruglov roman-kruglov commented Apr 26, 2022

Description

I want to improve it further to show a pretty summary like before. For this I split Reporter into several implementations - for zap and console.

Also simple output format is made default now.

It's a work in progress - I intend to split mectrics.go into several files. But I hope it gives a preview of what's coming if somebody touches same files.

P.S. I intend to finish this somewhere around today's evening.

Type of change

  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

if some scripts or bots use json as default now - we need to update those before releasing - the default becomes simple.

How Has This Been Tested?

By running and looking at the output in a terminal.

Test Configuration

  • Release version: latest main branch (v0.8.31 is the latest current release)
  • Platform: Mac OS

Logs

Output sample (real values crossed out, truncated for shorter text, alignment in console is better)

single http request     {"target": "https://sample/"}
single http request     {"target": "https://sample"}

 --- Traffic stats ---
 |                                Target | Requests attempted | Requests sent | Responses received | Data sent |
 |                  http://xx.xx.xx.xx |                  1 |                   0 |                  0 |     0.00 MB |
 |                  http://xx.xx.xx.xx |                  3 |                  0 |                  0 |     0.00 MB |
 |                        http://sample |                  2 |                  0 |                  0 |     0.00 MB |
 |                      https://sample |                  1 |                   0 |                  0 |     0.00 MB |
 |                                         --- |               --- |                --- |               --- |              --- |
 |                                      Total |   14623715 |    14620788 |           1490 | 139.66 MB |

loading config  {"path": "https://sample/config.json"}
the config has not changed. Keep calm and carry on!

@roman-kruglov roman-kruglov changed the title Simple output improvements Simple output improvements (also make simple output format default) Apr 26, 2022
@roman-kruglov roman-kruglov marked this pull request as ready for review April 26, 2022 19:14
@roman-kruglov roman-kruglov requested a review from arriven as a code owner April 26, 2022 19:14
Copy link
Owner

@arriven arriven left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but there are couple things that need to be addressed first

src/utils/metrics/reporter.go Outdated Show resolved Hide resolved
src/utils/metrics/reporter.go Outdated Show resolved Hide resolved
src/job/runner.go Outdated Show resolved Hide resolved
src/utils/metrics/reporter.go Show resolved Hide resolved
@roman-kruglov
Copy link
Contributor Author

Guys, could somebody look through the pr with a fresh eye to make sure I didn't fuck up memory somewhere. Pretty exhausted right now, I'll skim over it again in the morning.

@arriven arriven merged commit 8ac3e4e into arriven:main Apr 28, 2022
@roman-kruglov roman-kruglov deleted the simple-output-improvement branch April 28, 2022 08:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants