Closed ennerf closed 1 year ago
Hey there! I see you need help summarizing the previous results into a Pull Request review markdown document. Let's get started!
benchDrawCanvas
variable is changed from recorder.newDuration("chart-drawCanvas")
to recorder.newDebugDuration("chart-drawCanvas")
.axis.setRecorder
method call is changed from recorder.addPrefix("axis" + i++)
to recorder.addPrefix("axis" + i)
.gridRenderer.setRecorder
method call is added with the recorder
parameter.measurementFilter
variable is added with the rec -> rec.atLevel(BenchLevel.Info).contains("draw")
lambda expression.stage.showingProperty
listener is added to handle the case when the stage is not showing.setFilter
method is added with the measurementFilter
parameter.disable
method is modified to hide the stage and reset the recorder.benchDrawSingle
variable is changed from recorder.newDuration("xy-draw-single")
to recorder.newDebugDuration("xy-draw-single")
.BitState.java
, consider using CopyOnWriteArrayList
instead of ArrayList
for changeListeners
and invalidateListeners
to improve thread safety.EventSource.java
, remove the unnecessary synchronized block in the removeListener
method.EventSource.java
, there is a potential bug in the addListener
method where the comment mentions handling multithreaded changes to the listener, but no actual implementation is present.In BitState.java
, the addChangeListener
and addInvalidateListener
methods can be refactored for better readability by using method chaining.
public BitState addChangeListener(StateListener listener) {
changeListeners = changeListeners != null ? changeListeners : new CopyOnWriteArrayList<>();
changeListeners.add(listener);
return this;
}
public BitState addInvalidateListener(StateListener listener) {
invalidateListeners = invalidateListeners != null ? invalidateListeners : new CopyOnWriteArrayList<>();
invalidateListeners.add(listener);
return this;
}
Overall rating: 7.5/10 Criteria: readability, performance, security Brief explanation: The code is generally readable, but there are some areas that could be improved. The performance seems to be fine, and there are no obvious security issues.
That's it! Your Pull Request review markdown document is ready. Good luck with your review!
Attention: 37 lines
in your changes are missing coverage. Please review.
Comparison is base (
08a8be4
) 48.04% compared to head (bd5c502
) 48.04%.:exclamation: Current head bd5c502 differs from pull request most recent head ea9c852. Consider uploading reports for the commit ea9c852 to get more accurate results
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Kudos, SonarCloud Quality Gate passed!
0 Bugs
0 Vulnerabilities
0 Security Hotspots
1 Code Smell
No Coverage information
0.0% Duplication
PR with some tiny fixes:
BenchPlugin
to only allow a single open Window (fixes reset when a 2nd window is closed)SimplePerformanceMeter
to use theNode::isDirtyEmpty
method instead of theNode::dirtyBits
field which was changed/removed at one point.