Skip to content

246 improve benchmarks#364

Merged
heshamMassoud merged 13 commits intomasterfrom
246-improve-b
Dec 19, 2018
Merged

246 improve benchmarks#364
heshamMassoud merged 13 commits intomasterfrom
246-improve-b

Conversation

@heshamMassoud
Copy link
Copy Markdown
Contributor

@heshamMassoud heshamMassoud commented Dec 18, 2018

Summary

Addresses some points in #246

Description

  1. number of resources is now 1000 which should be good enough and will decrease exec time. The threshold is also be decreased accordingly.
  2. Benchmarks are now set to run once on every trigger.
  3. Benchmarks are now triggered on every push to master with the commit message matching Merge pull request... -> which means on every merge to master basically.
  4. Threshold is now hardcoded for every benchmark according to a factor of 10 (because now the resources is 10 times less than before) of the maximum of the history of benchmarks so far. However, this can be readjusted when we have enough data again for this new number of resources.

Relevant Issues

#246

Todo

  • Tests
    ~- [ ] Unit ~
    - [ ] Integration
    - [ ] Documentation
  • Add Release Notes entry.

@heshamMassoud heshamMassoud changed the title WIP: 246 improve b 246 improve benchmarks Dec 19, 2018
# Conflicts:
#	docs/RELEASE_NOTES.md
Copy link
Copy Markdown
Contributor

@ahmetoz ahmetoz left a comment

Choose a reason for hiding this comment

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

Good work, it seems you fixed the important issues in BenchmarkUtils. 🚀 🎉

Comment thread .travis.yml
Comment thread docs/RELEASE_NOTES.md
+ " threshold of '%d'.", diff, THRESHOLD))
.isLessThanOrEqualTo(THRESHOLD);
// assert on threshold (based on history of benchmarks; highest was ~9 seconds)
final int threshold = 69000; // 1 minute higher than highest benchmark
Copy link
Copy Markdown
Member

@butenkor butenkor Dec 19, 2018

Choose a reason for hiding this comment

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

Comment "1 minute" is confusing as it is not exact in comparison to the actual value. Also why would you use such high threshold if from history you know that it was never beyond 9s? Maybe 18s would be better threshold value here? Same comment applies to all other tests below.

Copy link
Copy Markdown
Contributor Author

@heshamMassoud heshamMassoud Dec 19, 2018

Choose a reason for hiding this comment

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

- Maybe instead of 1 minute -> ~1 minute in the comment?

Also why would you use such high threshold if from history you know that it was never beyond 9s?

makes sense. Will change.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Maybe instead of 1 minute -> ~1 minute in the comment

Why not the truth right away? :) -> "69 seconds"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Just to explain the choice of the magic number :)

Comment thread docs/RELEASE_NOTES.md
as (`true`, `SingleLine` and `None` respectivley) if they are `null` or not passed. [#354](https://github.com/commercetools/commercetools-sync-java/issues/354)

- 🛠️ **Enhancements** (1)
- **Commons** - Benchmarks are now run once on every merge to `master` with a lower number of resources for faster benchmarking. [#246](https://github.com/commercetools/commercetools-sync-java/issues/246)
Copy link
Copy Markdown
Member

@butenkor butenkor Dec 19, 2018

Choose a reason for hiding this comment

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

Why not run it on all PR branches too as one would like to see regression of performance before actual merge to master, right? How long does it take now?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I get that it will be useful for a maintainer, but not for a lib user.

hmm, the problem with that Is the graph would be piled up quickly with new results for every single PR opened.

Also shouldn't the graph show the benchmarks of the actual state of the library (on master) for the users using it as opposed to just a PR that a dev is working on?

How long does it take now?

Still didn't try a full benchmark run on travis with this change. We'll see after this is merged.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I get that it will be useful for a maintainer, but not for a lib user

Any contributor would probably use the library too - stable performance is relevant to everyone.

hmm, the problem with that Is the graph would be piled up quickly with new results for every single PR opened

Also shouldn't the graph show the benchmarks of the actual state of the library (on master) for the users using it as opposed to just a PR that a dev is working on?

Maybe run the benchmark on any PR, report readable regression but update benchmark JSON only on master. wdyt?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This would be good, yes. Will add to the improvements issue #246 and address later then ;)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@codecov-io
Copy link
Copy Markdown

codecov-io commented Dec 19, 2018

Codecov Report

Merging #364 into master will decrease coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #364      +/-   ##
============================================
- Coverage     99.26%   99.25%   -0.01%     
+ Complexity     1261     1259       -2     
============================================
  Files           112      112              
  Lines          3116     3106      -10     
  Branches        152      152              
============================================
- Hits           3093     3083      -10     
  Misses           12       12              
  Partials         11       11
Impacted Files Coverage Δ Complexity Δ
.../sync/products/utils/ProductUpdateActionUtils.java 96.1% <0%> (-0.24%) 65% <0%> (-2%)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e10c822...bc79d5f. Read the comment docs.

@heshamMassoud heshamMassoud merged commit 9d997d9 into master Dec 19, 2018
@heshamMassoud heshamMassoud deleted the 246-improve-b branch December 19, 2018 13:15
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.

4 participants