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

First cut at kernel stats collection facility #1131

Merged
merged 5 commits into from
May 28, 2020
Merged

Conversation

FUDCo
Copy link
Contributor

@FUDCo FUDCo commented May 23, 2020

No description provided.

@FUDCo FUDCo added enhancement New feature or request SwingSet package: SwingSet swingset-runner package: swingset-runner labels May 23, 2020
@FUDCo FUDCo requested a review from warner May 23, 2020 08:27
Copy link
Member

@warner warner left a comment

Choose a reason for hiding this comment

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

That looks great.

The only improvement I can think of is to maybe tolerate upgrade by having loadStats fill in defaults for any that weren't present on disk (rename the initial let kernelStats = { .. } declaration to initialStats, copy it into kernelStats on first run, and then loadStats becomes something like kernelStats = { ...JSON.parse(..), ...initialStats }. I'm not entirely sure it's a good idea, because if we e.g. add a new statistic, sure we don't have to delete the whole save file, but now the resulting stats will be kind of corrupted, because we'll be missing data on the new statistic for whatever happened in the previous run. I'm generally thinking that corrupted/incomplete stats are better than forcing someone to blow away their whole swingset machine due to a stats improvement that they probably don't even care about, but I could be talked out of it.

+1 to land, with or without a stats-upgrade change, your call.

(of course, rebase to current trunk before landing, as usual)

packages/SwingSet/src/controller.js Outdated Show resolved Hide resolved
@FUDCo FUDCo force-pushed the stats-collection branch from ee9b624 to 3f242dd Compare May 28, 2020 18:34
@FUDCo FUDCo merged commit 30fcc4f into master May 28, 2020
@FUDCo FUDCo deleted the stats-collection branch May 28, 2020 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request SwingSet package: SwingSet swingset-runner package: swingset-runner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants