8000 scheduler: fix console top to show deltas by fwbrasil · Pull Request #399 · getkyo/kyo · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

scheduler: fix console top to show deltas #399

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

Merged
merged 2 commits into from
May 21, 2024
Merged

scheduler: fix console top to show deltas #399

merged 2 commits into from
May 21, 2024

Conversation

fwbrasil
Copy link
Collaborator

No description provided.


if (enableTopConsoleMs > 0)
timer.schedule(enableTopConsoleMs.millis) {
println(Top.print(status()))
val currentStatus = status()
if (lastConsoleStatus != null) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

ne 😛


if (enableTopConsoleMs > 0)
timer.schedule(enableTopConsoleMs.millis) {
println(Top.print(status()))
val currentStatus = status()
Copy link
Collaborator

Choose a reason for hiding this comment

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

I assume status() will never return null?

If not, should we have a Status.empty to prevent gaps in reporting? That would prevent the need for null on line 27 as well.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm not sure there's much value in reporting the initial measurement since it'd present accumulated counters up to the point when the observation started.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Right, wasn't sure if status could also be null for any other reason.

@hearnadam hearnadam merged commit 7ff69fa into main May 21, 2024
3 checks passed
@fwbrasil fwbrasil deleted the console-top-fix branch June 6, 2024 01:55
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
0