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

perf: use custom HTTP Cache #1910

Merged
merged 23 commits into from
May 19, 2024
Merged

Conversation

ranjitmahadik
Copy link
Contributor

@ranjitmahadik ranjitmahadik commented May 10, 2024

Summary:
PR contains a benchmark for execute method present in http.rs.
currently the benchmark only tests execute method with http_cache set to true.

bench results:
before:
[38.054 µs 38.204 µs 38.428 µs]
[27.049 µs 27.363 µs 27.774 µs]
[26.795 µs 27.089 µs 27.492 µs]

after:
[18.419 µs 18.432 µs 18.449 µs]
[17.414 µs 17.743 µs 18.018 µs]
[14.797 µs 14.876 µs 14.975 µs]

performance improvement : 51%.

Issue Reference(s):
related to #1852

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: chore Routine tasks like conversions, reorganization, and maintenance work. label May 10, 2024
@ranjitmahadik ranjitmahadik added the ci: benchmark Runs benchmarks label May 10, 2024
Copy link

github-actions bot commented May 10, 2024

🐰Bencher

ReportSat, May 18, 2024 at 14:23:14 UTC
Projecttailcall
Branch1910/merge
Testbedbenchmarking-runner

🚨 1 ALERT: Threshold Boundary Limit exceeded!
BenchmarkMeasure (units)ViewValueLower BoundaryUpper Boundary
input/vars.missingLatency (nanoseconds (ns))🚨 (view plot | view alert)11.11 (+30.06%)10.90 (101.87%)

Click to view all benchmark results
BenchmarkLatencyLatency Results
nanoseconds (ns) | (Δ%)
Latency Upper Boundary
nanoseconds (ns) | (%)
group_by✅ (view plot)545.23 (-8.90%)648.41 (84.09%)
input/args.missing✅ (view plot)22.81 (-7.72%)27.22 (83.81%)
input/args.nested.existing✅ (view plot)41.10 (-20.80%)65.98 (62.30%)
input/args.nested.missing✅ (view plot)37.10 (-3.67%)40.63 (91.31%)
input/args.root✅ (view plot)38.43 (-20.70%)62.48 (61.51%)
input/headers.existing✅ (view plot)32.33 (+1.70%)33.48 (96.56%)
input/headers.missing✅ (view plot)31.77 (+3.12%)33.40 (95.10%)
input/value.missing✅ (view plot)23.09 (-1.92%)25.35 (91.09%)
input/value.nested.existing✅ (view plot)40.94 (-1.29%)43.93 (93.21%)
input/value.nested.missing✅ (view plot)37.00 (+1.59%)38.38 (96.42%)
input/value.root✅ (view plot)37.72 (-1.96%)40.41 (93.32%)
input/vars.existing✅ (view plot)7.46 (-8.59%)9.06 (82.28%)
input/vars.missing🚨 (view plot | view alert)11.11 (+30.06%)10.90 (101.87%)
test_batched_body✅ (view plot)2,609.50 (-99.69%)2,642,500.87 (0.10%)
test_batched_body #2✅ (view plot)1,643,700.00 (-5.37%)1,887,313.85 (87.09%)
test_data_loader✅ (view plot)460,950.00 (-2.39%)490,227.06 (94.03%)
test_handle_request✅ (view plot)157,440.00 (-7.37%)183,550.74 (85.77%)
test_http_execute_method✅ (view plot)17,926.00 (-1.19%)19,093.74 (93.88%)
with_mustache_expressions✅ (view plot)1,181.60 (+0.82%)1,237.10 (95.51%)
with_mustache_literal✅ (view plot)721.59 (-0.38%)773.47 (93.29%)

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

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 12, 2024
@github-actions github-actions bot removed the state: inactive No current action needed/possible; issue fixed, out of scope, or superseded. label May 13, 2024
src/lib.rs Outdated Show resolved Hide resolved
Copy link

codecov bot commented May 15, 2024

Codecov Report

Attention: Patch coverage is 95.78947% with 4 lines in your changes are missing coverage. Please review.

Project coverage is 82.16%. Comparing base (7f9913d) to head (528d36e).

Files Patch % Lines
tailcall-http-cache/src/cache.rs 97.84% 2 Missing ⚠️
src/cli/runtime/http.rs 0.00% 1 Missing ⚠️
src/core/runtime.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1910      +/-   ##
==========================================
+ Coverage   82.08%   82.16%   +0.08%     
==========================================
  Files         173      174       +1     
  Lines       17623    17716      +93     
==========================================
+ Hits        14465    14556      +91     
- Misses       3158     3160       +2     

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

@tusharmath tusharmath enabled auto-merge (squash) May 15, 2024 08:33
@tusharmath tusharmath changed the title chore: added http execute benchmark perf: use custom HTTP Cache May 15, 2024
@tusharmath tusharmath removed the ci: benchmark Runs benchmarks label May 15, 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 17, 2024
@github-actions github-actions bot added ci: benchmark Runs benchmarks type: performance Improved performance. labels May 18, 2024
@tusharmath tusharmath removed the ci: benchmark Runs benchmarks label May 18, 2024
Cargo.toml Show resolved Hide resolved
@github-actions github-actions bot added the ci: benchmark Runs benchmarks label May 19, 2024
@tusharmath tusharmath merged commit 71e789e into main May 19, 2024
32 checks passed
@tusharmath tusharmath deleted the chore/added-http-execute-benchmark branch May 19, 2024 11:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci: benchmark Runs benchmarks type: chore Routine tasks like conversions, reorganization, and maintenance work. type: performance Improved performance.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants