fair-acc / chart-fx

A scientific charting library focused on performance optimised real-time data visualisation at 25 Hz update rates for data sets with a few 10 thousand up to 5 million data points.
GNU Lesser General Public License v3.0
488 stars 90 forks source link

benchmark module #614

Closed ennerf closed 9 months ago

ennerf commented 9 months ago

Simple PR that moves the benchmark classes to a dedicated module that is compatible with jdk8.

This allows it to be used in older code bases that can't depend on dataset (jdk11).

sonarcloud[bot] commented 9 months ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 18 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

codecov[bot] commented 9 months ago

Codecov Report

Patch coverage has no change and project coverage change: +0.11% :tada:

Comparison is base (3846311) 47.90% compared to head (19653ba) 48.01%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #614 +/- ## ============================================ + Coverage 47.90% 48.01% +0.11% - Complexity 6181 6187 +6 ============================================ Files 401 394 -7 Lines 38254 38176 -78 Branches 6087 6085 -2 ============================================ + Hits 18326 18332 +6 + Misses 18778 18703 -75 + Partials 1150 1141 -9 ``` | [Files Changed](https://app.codecov.io/gh/fair-acc/chart-fx/pull/614?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=fair-acc) | Coverage Δ | | |---|---|---| | [...chart/src/main/java/io/fair\_acc/chartfx/Chart.java](https://app.codecov.io/gh/fair-acc/chart-fx/pull/614?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=fair-acc#diff-Y2hhcnRmeC1jaGFydC9zcmMvbWFpbi9qYXZhL2lvL2ZhaXJfYWNjL2NoYXJ0ZngvQ2hhcnQuamF2YQ==) | `78.81% <ø> (ø)` | | | [...art/src/main/java/io/fair\_acc/chartfx/XYChart.java](https://app.codecov.io/gh/fair-acc/chart-fx/pull/614?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=fair-acc#diff-Y2hhcnRmeC1jaGFydC9zcmMvbWFpbi9qYXZhL2lvL2ZhaXJfYWNjL2NoYXJ0ZngvWFlDaGFydC5qYXZh) | `61.02% <ø> (ø)` | | | [...t/src/main/java/io/fair\_acc/chartfx/axes/Axis.java](https://app.codecov.io/gh/fair-acc/chart-fx/pull/614?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=fair-acc#diff-Y2hhcnRmeC1jaGFydC9zcmMvbWFpbi9qYXZhL2lvL2ZhaXJfYWNjL2NoYXJ0ZngvYXhlcy9BeGlzLmphdmE=) | `0.00% <ø> (ø)` | | | [...ava/io/fair\_acc/chartfx/axes/spi/AbstractAxis.java](https://app.codecov.io/gh/fair-acc/chart-fx/pull/614?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=fair-acc#diff-Y2hhcnRmeC1jaGFydC9zcmMvbWFpbi9qYXZhL2lvL2ZhaXJfYWNjL2NoYXJ0ZngvYXhlcy9zcGkvQWJzdHJhY3RBeGlzLmphdmE=) | `81.18% <ø> (+0.39%)` | :arrow_up: | | [...air\_acc/chartfx/bench/CircularDoubleDataSet2D.java](https://app.codecov.io/gh/fair-acc/chart-fx/pull/614?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=fair-acc#diff-Y2hhcnRmeC1jaGFydC9zcmMvbWFpbi9qYXZhL2lvL2ZhaXJfYWNjL2NoYXJ0ZngvYmVuY2gvQ2lyY3VsYXJEb3VibGVEYXRhU2V0MkQuamF2YQ==) | `0.00% <ø> (ø)` | | | [...io/fair\_acc/chartfx/bench/HdrHistogramDataSet.java](https://app.codecov.io/gh/fair-acc/chart-fx/pull/614?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=fair-acc#diff-Y2hhcnRmeC1jaGFydC9zcmMvbWFpbi9qYXZhL2lvL2ZhaXJfYWNjL2NoYXJ0ZngvYmVuY2gvSGRySGlzdG9ncmFtRGF0YVNldC5qYXZh) | `0.00% <ø> (ø)` | | | [...o/fair\_acc/chartfx/bench/HdrHistogramRecorder.java](https://app.codecov.io/gh/fair-acc/chart-fx/pull/614?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=fair-acc#diff-Y2hhcnRmeC1jaGFydC9zcmMvbWFpbi9qYXZhL2lvL2ZhaXJfYWNjL2NoYXJ0ZngvYmVuY2gvSGRySGlzdG9ncmFtUmVjb3JkZXIuamF2YQ==) | `0.00% <ø> (ø)` | | | [...io/fair\_acc/chartfx/bench/LiveDisplayRecorder.java](https://app.codecov.io/gh/fair-acc/chart-fx/pull/614?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=fair-acc#diff-Y2hhcnRmeC1jaGFydC9zcmMvbWFpbi9qYXZhL2lvL2ZhaXJfYWNjL2NoYXJ0ZngvYmVuY2gvTGl2ZURpc3BsYXlSZWNvcmRlci5qYXZh) | `0.00% <0.00%> (ø)` | | | [...o/fair\_acc/chartfx/bench/MeasurementRecorders.java](https://app.codecov.io/gh/fair-acc/chart-fx/pull/614?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=fair-acc#diff-Y2hhcnRmeC1jaGFydC9zcmMvbWFpbi9qYXZhL2lvL2ZhaXJfYWNjL2NoYXJ0ZngvYmVuY2gvTWVhc3VyZW1lbnRSZWNvcmRlcnMuamF2YQ==) | `0.00% <ø> (ø)` | | | [...java/io/fair\_acc/chartfx/bench/PercentileAxis.java](https://app.codecov.io/gh/fair-acc/chart-fx/pull/614?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=fair-acc#diff-Y2hhcnRmeC1jaGFydC9zcmMvbWFpbi9qYXZhL2lvL2ZhaXJfYWNjL2NoYXJ0ZngvYmVuY2gvUGVyY2VudGlsZUF4aXMuamF2YQ==) | `0.00% <ø> (ø)` | | | ... and [8 more](https://app.codecov.io/gh/fair-acc/chart-fx/pull/614?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=fair-acc) | | ... and [9 files with indirect coverage changes](https://app.codecov.io/gh/fair-acc/chart-fx/pull/614/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=fair-acc)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

pr-explainer-bot[bot] commented 9 months ago

Hey there! I see you need help summarizing the previous results to write a Pull request review markdown doc. Let's get started!

Pull Request Review

Changes

  1. Changed package name from io.fair_acc.dataset.benchmark to io.fair_acc.bench in multiple files.
  2. Renamed AggregateDurationMeasure class package from io.fair_acc.dataset.benchmark to io.fair_acc.bench.
  3. Renamed BenchLevel class package from io.fair_acc.dataset.benchmark to io.fair_acc.bench.
  4. Renamed DurationMeasure class package from io.fair_acc.dataset.benchmark to io.fair_acc.bench.
  5. Renamed Measurable interface package from io.fair_acc.dataset.benchmark to io.fair_acc.bench.
  6. Renamed MeasurementRecorder class package from io.fair_acc.dataset.benchmark to io.fair_acc.bench.
  7. Renamed RecordingDurationMeasure class package from io.fair_acc.dataset.benchmark to io.fair_acc.bench.
  8. Renamed TimeMeasure class package from io.fair_acc.dataset.benchmark to io.fair_acc.bench.
  9. Renamed Chart class package from io.fair_acc.chartfx to io.fair_acc.chartfx.
  10. Renamed XYChart class package from io.fair_acc.chartfx to io.fair_acc.chartfx.
  11. Renamed Axis interface package from io.fair_acc.chartfx.axes to io.fair_acc.chartfx.axes.

Suggestions

  1. In HdrHistogramRecorder.java, line 1-7, consider changing the package name from io.fair_acc.chartfx.benchmark to io.fair_acc.chartfx.bench.
  2. In HdrHistogramRecorder.java, line 9-10, consider changing the import statements from io.fair_acc.dataset.benchmark to io.fair_acc.bench.
  3. In LiveDisplayRecorder.java, line 1-4, consider changing the package name from io.fair_acc.chartfx.benchmark to io.fair_acc.chartfx.bench.
  4. In LiveDisplayRecorder.java, line 6-7, consider changing the import statements from io.fair_acc.dataset.benchmark to io.fair_acc.bench.
  5. In LiveDisplayRecorder.java, line 48, consider changing the method visibility from private to public.
  6. In LiveDisplayRecorder.java, line 51, consider changing the method name from...

Bugs

  1. Potential bug: In DataSetLock.java, the import statement import io.fair_acc.dataset.benchmark.Measurable; was changed to import io.fair_acc.bench.Measurable;. Make sure this change doesn't introduce any compatibility issues or break any dependencies.
  2. Potential bug: In AbstractDataSet.java, the import statement import io.fair_acc.dataset.benchmark.MeasurementRecorder; was changed to import io.fair_acc.bench.MeasurementRecorder;. Make sure this change doesn't introduce any compatibility issues or break any dependencies.
  3. Potential bug: In AbstractDataSet.java, the import statement import io.fair_acc.dataset.benchmark.DurationMeasure; was changed to import io.fair_acc.bench.DurationMeasure;. Make sure this change doesn't introduce any compatibility issues or break any dependencies.

Improvements

  1. In AbstractDataSet.java, the following code snippet can be refactored for better readability:
    import io.fair_acc.dataset.locks.DefaultDataSetLock;

Rating

Overall rating: 7.5/10 Criteria: readability, performance, security Brief explanation: The code is generally readable, but could benefit from more comments and explanations. Performance and security aspects seem to be fine.

That's it! I hope this summary helps you with your Pull request review. If you need any further assistance, feel free to ask!