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

fix: replacing HeaderMap::new with HeaderMap::with_capacity #1923

Closed
wants to merge 11 commits into from

Conversation

shashitnak
Copy link
Contributor

@shashitnak shashitnak commented May 13, 2024

Summary:
Following improvements were observed when running the nginx benchmark locally

Before the change:
image

After the change:
image

Issue Reference(s):
Fixes #... (Replace "..." with the issue number)

Build & Testing:

  • I ran cargo test successfully.
  • I have run ./lint.sh --mode=fix to fix all linting issues raised by ./lint.sh --mode=check.

Checklist:

  • I have added relevant unit & integration tests.
  • I have updated the documentation accordingly.
  • I have performed a self-review of my code.
  • PR follows the naming convention of <type>(<optional scope>): <title>

@github-actions github-actions bot added the type: feature Brand new functionality, features, pages, workflows, endpoints, etc. label May 13, 2024
Copy link

codecov bot commented May 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.73%. Comparing base (2b98fde) to head (a93cd03).
Report is 26 commits behind head on perf/base.

Current head a93cd03 differs from pull request most recent head e92a03f

Please upload reports for the commit e92a03f to get more accurate results.

Additional details and impacted files
@@              Coverage Diff              @@
##           perf/base    #1923      +/-   ##
=============================================
- Coverage      89.73%   89.73%   -0.01%     
=============================================
  Files            155      155              
  Lines          15837    15832       -5     
=============================================
- Hits           14212    14207       -5     
  Misses          1625     1625              

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

@shashitnak shashitnak added the ci: benchmark Runs benchmarks label May 13, 2024
Copy link

github-actions bot commented May 13, 2024

🐰Bencher

ReportMon, May 13, 2024 at 14:55:21 UTC
Projecttailcall
Branch1923/merge
Testbedbenchmarking-runner

🚨 1 ALERT: Threshold Boundary Limit exceeded!
BenchmarkMeasure (units)ViewValueLower BoundaryUpper Boundary
input/vars.missingLatency (nanoseconds (ns))🚨 (view plot | view alert)11.23 (+37.60%)9.34 (120.21%)

Click to view all benchmark results
BenchmarkLatencyLatency Results
nanoseconds (ns) | (Δ%)
Latency Upper Boundary
nanoseconds (ns) | (%)
group_by✅ (view plot)544.96 (-10.11%)636.62 (85.60%)
input/args.missing✅ (view plot)22.77 (-8.93%)27.15 (83.88%)
input/args.nested.existing✅ (view plot)40.40 (-24.50%)65.67 (61.52%)
input/args.nested.missing✅ (view plot)35.94 (-7.00%)40.76 (88.18%)
input/args.root✅ (view plot)35.75 (-28.69%)61.92 (57.74%)
input/headers.existing✅ (view plot)32.68 (+2.77%)33.34 (98.03%)
input/headers.missing✅ (view plot)31.57 (+2.76%)32.83 (96.16%)
input/value.missing✅ (view plot)23.08 (-2.06%)25.28 (91.28%)
input/value.nested.existing✅ (view plot)41.13 (-0.64%)43.55 (94.45%)
input/value.nested.missing✅ (view plot)37.63 (+3.64%)38.24 (98.42%)
input/value.root✅ (view plot)37.29 (-3.51%)40.03 (93.14%)
input/vars.existing✅ (view plot)7.14 (-13.51%)9.02 (79.15%)
input/vars.missing🚨 (view plot | view alert)11.23 (+37.60%)9.34 (120.21%)
test_batched_body✅ (view plot)2,589.80 (-99.74%)2,762,825.90 (0.09%)
test_batched_body #2✅ (view plot)1,776,700.00 (+0.75%)1,891,747.93 (93.92%)
test_data_loader✅ (view plot)463,790.00 (-2.04%)490,463.34 (94.56%)
test_handle_request✅ (view plot)172,750.00 (-0.07%)182,486.35 (94.66%)
with_mustache_expressions✅ (view plot)1,155.10 (-1.64%)1,237.75 (93.32%)
with_mustache_literal✅ (view plot)704.86 (-2.56%)765.85 (92.04%)

Bencher - Continuous Benchmarking
View Public Perf Page
Docs | Repo | Chat | Help

@amitksingh1490 amitksingh1490 marked this pull request as ready for review May 13, 2024 14:41
@amitksingh1490 amitksingh1490 changed the title perf: replacing HeaderMap::new with HeaderMap::with_capacity fix: replacing HeaderMap::new with HeaderMap::with_capacity May 13, 2024
@amitksingh1490 amitksingh1490 added type: fix Iterations on existing features or infrastructure. and removed type: feature Brand new functionality, features, pages, workflows, endpoints, etc. labels May 13, 2024
@amitksingh1490 amitksingh1490 changed the base branch from main to perf/base May 13, 2024 15:14
shashitnak and others added 4 commits May 13, 2024 21:45
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: amit <amitksingh1490@gmail.com>
@github-actions github-actions bot added the type: feature Brand new functionality, features, pages, workflows, endpoints, etc. label May 14, 2024
@shashitnak shashitnak marked this pull request as draft May 14, 2024 07:51
Copy link

Action required: PR inactive for 2 days.
Status update or closure in 5 days.

@github-actions github-actions bot added the state: inactive No current action needed/possible; issue fixed, out of scope, or superseded. label May 16, 2024
@tusharmath tusharmath removed the ci: benchmark Runs benchmarks label May 18, 2024
@github-actions github-actions bot removed the state: inactive No current action needed/possible; issue fixed, out of scope, or superseded. label May 18, 2024
Copy link

Action required: PR inactive for 2 days.
Status update or closure in 5 days.

@github-actions github-actions bot added state: inactive No current action needed/possible; issue fixed, out of scope, or superseded. and removed state: inactive No current action needed/possible; issue fixed, out of scope, or superseded. labels May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature Brand new functionality, features, pages, workflows, endpoints, etc. type: fix Iterations on existing features or infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants