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

Convert latency thresholds from magic numbers to named constants #608

Merged
merged 1 commit into from
Nov 23, 2024

Conversation

AMDmi3
Copy link
Contributor

@AMDmi3 AMDmi3 commented Nov 22, 2024

No functional change, just minor code cleanup. Not sure whether it would be better to name these YELLOW/RED or GREEN/YELLOW, or GREEN_YELLOW/YELLOW_RED.

The thing is I was setting up similar thresholds in my grafana, and got curious which these are in oha which I often use, but I've had to spend a few minutes to find them, which wouldn't have been the case if these were named constants.

Out of curiosity, what are your thresholds based on? For now I've only been able to find justification for 400ms threshold, and I'd probably set this as red, while yellow would be some lower value known to be unnoticeable to user, maybe around 50ms.

@hatoo hatoo merged commit 0e79e91 into hatoo:master Nov 23, 2024
11 checks passed
@hatoo
Copy link
Owner

hatoo commented Nov 23, 2024

Thank you!
The current threshold is set at #292.
I didn't care about the value but it should be based on some justification.
I created #609 for this issue.

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.

2 participants