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

[Feature Request] Time series CSV / JSON output #542

Open
alshdavid opened this issue Jul 25, 2024 · 3 comments
Open

[Feature Request] Time series CSV / JSON output #542

alshdavid opened this issue Jul 25, 2024 · 3 comments

Comments

@alshdavid
Copy link

Hi, thank you for developing this software - it's fantastic.

Would it be possible to add in a time-series/output that counts the number of requests, grouped/counted at a specified unit of time and emits that as CSV?

This could be used to generate a line graph or histogram of requests per second over time.

Something like this:

$ oha --time-series 1s > output.csv
$ cat output.csv

time(s),count
0, 100
1, 120
2, 110
3, 100
4, 90
5, 100

This is helpful in demonstrating the consistency in the delivery of requests. Take for example this run:

Screencast.from.2024-07-25.17-10-04.mp4

The "average time" is not helpful in describing the service experience.

@hatoo
Copy link
Owner

hatoo commented Jul 26, 2024

Hi, oha has a similar feature in the rps key on JSON output.
You can use it by oha -j.

oha/schema.json

Lines 212 to 282 in 6eb9b0e

"rps": {
"description": "The statistics for requests per second. Note: the way of calculating rps over time isn't obvious, see source code for details.",
"type": "object",
"properties": {
"mean": {
"type": "number"
},
"stddev": {
"type": [
"number",
"null"
]
},
"max": {
"type": "number"
},
"min": {
"type": "number"
},
"percentiles": {
"type": "object",
"properties": {
"p10": {
"type": "number"
},
"p25": {
"type": "number"
},
"p50": {
"type": "number"
},
"p75": {
"type": "number"
},
"p90": {
"type": "number"
},
"p95": {
"type": "number"
},
"p99": {
"type": "number"
},
"p99.9": {
"type": "number"
},
"p99.99": {
"type": "number"
}
},
"required": [
"p10",
"p25",
"p50",
"p75",
"p90",
"p95",
"p99",
"p99.9",
"p99.99"
]
}
},
"required": [
"mean",
"stddev",
"max",
"min",
"percentiles"
]
},

Do you think this feature is enough for your use cases or not?

@alshdavid
Copy link
Author

Not quite, I have a case where my stddev & percentiles scores don't capture the experience depicted by these sorts of runs:

Jn3spIT.mp4

I could be wrong but I feel that creating a line graph that represents the events against their time would be easier to understand

@hatoo
Copy link
Owner

hatoo commented Aug 3, 2024

I've decided to dump all data to sqlite3 rather than export specific analyses.
Could you take a look #263 ?

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

No branches or pull requests

2 participants