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

[NO-TICKET] Don't put results in benchmarking folder directly #3833

Merged
merged 1 commit into from
Aug 12, 2024

Conversation

ivoanjo
Copy link
Member

@ivoanjo ivoanjo commented Aug 8, 2024

What does this PR do?

This PR tweaks the configuration for benchmark output results to place result files in the current directory the benchmark gets executed from, instead of placing the results in the benchmarks directory.

Motivation:

In #3810 we standardized the results output file name in benchmarks to match the benchmark name.

In that PR, we used __FILE__ as a prefix. This changed where results are placed: where previously they were placed in the current folder where the benchmarks were run from (often the root of the repo), with this PR, they started getting placed in the benchmarks directory.

This clashes with our validate_benchmarks_spec.rb that look for files in those directories, e.g. running a benchmark and then running the test suite will make the test suite fail which is somewhat annoying.

While I could've changed the tests to filter out results files, I also find it useful to place the results where I'm executing the benchmarks from, as it makes organization easier (you just run the benchmark from where you want and you get the result there ).

Additional Notes:

N/A

How to test the change?

Run the benchmarks and confirm the results file gets placed in the current folder! :)

@ivoanjo ivoanjo requested a review from a team as a code owner August 8, 2024 08:28
@github-actions github-actions bot added the dev/testing Involves testing processes (e.g. RSpec) label Aug 8, 2024
@ivoanjo ivoanjo requested a review from p-datadog August 8, 2024 08:28
@codecov-commenter
Copy link

codecov-commenter commented Aug 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.87%. Comparing base (0ba87b9) to head (5a52a42).
Report is 18 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3833   +/-   ##
=======================================
  Coverage   97.86%   97.87%           
=======================================
  Files        1264     1264           
  Lines       75762    75762           
  Branches     3720     3720           
=======================================
+ Hits        74146    74151    +5     
+ Misses       1616     1611    -5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

**What does this PR do?**

This PR tweaks the configuration for benchmark output results to place
result files in the current directory the benchmark gets executed from,
instead of placing the results in the benchmarks directory.

**Motivation:**

In #3810 we standardized the results output file name in benchmarks to
match the benchmark name.

In that PR, we used `__FILE__` as a prefix. This changed where results
are placed: where previously they were placed in the current folder
where the benchmarks were run from (often the root of the repo), with
this PR, they started getting placed in the benchmarks directory.

This clashes with our `validate_benchmarks_spec.rb` that look for
files in those directories, e.g. running a benchmark and then running
the test suite will make the test suite fail which is somewhat
annoying.

While I could've changed the tests to filter out results files, I also
find it useful to place the results where I'm executing the benchmarks
from, as it makes organization easier (you just run the benchmark from
where you want and you get the result there ).

**Additional Notes:**

N/A

**How to test the change?**

Run the benchmarks and confirm the results file gets placed in the
current folder! :)
@ivoanjo ivoanjo force-pushed the ivoanjo/dont-put-results-in-benchmark-folder branch from b971c15 to 5a52a42 Compare August 9, 2024 11:41
@ivoanjo
Copy link
Member Author

ivoanjo commented Aug 12, 2024

I need to tweak our test execution harness before merging this, it's failing with

+ cp 'benchmarks/*-results.json' /go/src/github.com/DataDog/apm-reliability/dd-trace-rb/artifacts/candidate
cp: cannot stat 'benchmarks/*-results.json': No such file or directory

@ivoanjo
Copy link
Member Author

ivoanjo commented Aug 12, 2024

This is currently blocked by https://github.com/DataDog/benchmarking-platform/pull/92

@ddyurchenko ddyurchenko self-requested a review August 12, 2024 12:58
@pr-commenter
Copy link

pr-commenter bot commented Aug 12, 2024

Benchmarks

Benchmark execution time: 2024-08-12 13:47:20

Comparing candidate commit 5a52a42 in PR branch ivoanjo/dont-put-results-in-benchmark-folder with baseline commit 0ba87b9 in branch master.

Found 2 performance improvements and 0 performance regressions! Performance is the same for 21 metrics, 2 unstable metrics.

scenario:profiler gc

  • 🟩 throughput [+11090.932op/s; +11850.220op/s] or [+3.047%; +3.255%]

scenario:stack collector

  • 🟩 throughput [+66.077op/s; +67.629op/s] or [+2.451%; +2.508%]

@ivoanjo ivoanjo merged commit cd3288d into master Aug 12, 2024
186 checks passed
@ivoanjo ivoanjo deleted the ivoanjo/dont-put-results-in-benchmark-folder branch August 12, 2024 13:48
@github-actions github-actions bot added this to the 2.3.0 milestone Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev/testing Involves testing processes (e.g. RSpec)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants