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

test: Updated shimmer method in benchmark tests #2281

Merged
merged 3 commits into from
Jun 25, 2024

Conversation

mrickard
Copy link
Member

Description

Benchmark tests have not been updated across several API changes, resulting in test failures. One such change was replacing shimmer's patchModule and unpatchModule with registerHooks and removeHooks. In this PR, I've

  • Updated the shimmer benchmark test to use registerHooks and removeHooks
  • Added params to the BenchmarkStats constructor to log context about which tests are being run, in the event of an error.

How to Test

npm run bench will still throw some errors on promise and database tests, but will output benchmark data for several modules.

Related Issues

Closes NR-171849

…erHooks and removeHooks

Signed-off-by: mrickard <maurice@mauricerickard.com>
…hmark tests

Signed-off-by: mrickard <maurice@mauricerickard.com>
Signed-off-by: mrickard <maurice@mauricerickard.com>
Copy link

codecov bot commented Jun 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.27%. Comparing base (7e3cab9) to head (25ff59b).
Report is 7 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2281      +/-   ##
==========================================
- Coverage   96.27%   96.27%   -0.01%     
==========================================
  Files         284      284              
  Lines       45230    45230              
==========================================
- Hits        43544    43543       -1     
- Misses       1686     1687       +1     
Flag Coverage Δ
unit-tests-16.x 89.18% <ø> (ø)
unit-tests-18.x 89.16% <ø> (ø)
unit-tests-20.x 89.16% <ø> (ø)
versioned-tests-16.x 77.57% <ø> (-0.08%) ⬇️
versioned-tests-18.x 78.61% <ø> (-0.06%) ⬇️
versioned-tests-20.x 78.59% <ø> (-0.08%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

Copy link
Contributor

@jsumners-nr jsumners-nr left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@bizob2828 bizob2828 added the dev:tests Indicates only changes to tests label Jun 24, 2024
@bizob2828 bizob2828 changed the title chore: Updating shimmer method in benchmark tests test: Updated shimmer method in benchmark tests Jun 24, 2024
@mrickard mrickard merged commit 1528d68 into newrelic:main Jun 25, 2024
32 checks passed
This was referenced Jun 25, 2024
@mrickard mrickard deleted the mrickard/benchmark-test-spike branch August 8, 2024 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev:tests Indicates only changes to tests
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants