-
Notifications
You must be signed in to change notification settings - Fork 688
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
Module Metrics #1438
Module Metrics #1438
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1438 +/- ##
=========================================
Coverage 76% 77%
- Complexity 3868 3948 +80
=========================================
Files 178 178
Lines 25041 25279 +238
Branches 3547 3624 +77
=========================================
+ Hits 19249 19486 +237
- Misses 4667 4677 +10
+ Partials 1125 1116 -9 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and verified locally, just one suggestion that you can ignore if you'd prefer to keep things as is.
+ decimal(count.get(), total) + "%")); | ||
} | ||
System.out.println(); | ||
List<ModuleSupplier> suppliers = Module.getModuleSuppliers(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a thought but if you modified List<ModuleSupplier> getModuleSuppliers(Predicate<String> predicate)
in Module.java to take a Predicate<ModuleSupplier>
instead then you could get rid of the loop that follows while also making that method more flexible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That sounds like a good idea. I'll take a look at it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I made a change. Everything should be ready to go.
This branch revamps the module, state, and transition metrics.
Previously, use of the
generate.track_detailed_transition_metrics
property outputted metrics to system out. Using this feature roughly quadrupled the runtime.This change outputs the metrics as JSON (
./output/metrics/**
), one file per module. Using this feature will roughly double the runtime.Sample output looks something like this for each state, where the name of the state (e.g.,
Chance_of_Stroke
matches a state name in the corresponding GMF module):entered
duration
population
current
destinations