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

rpc benchmark: json rpc benchmark #20912

Open
wants to merge 6 commits into
base: grafana-pull
Choose a base branch
from
Open

rpc benchmark: json rpc benchmark #20912

wants to merge 6 commits into from

Conversation

gegaowp
Copy link
Contributor

@gegaowp gegaowp commented Jan 17, 2025

Description

  • load requests from jsonl file
  • generate and file JSON RPC requests concurrently
  • collect total and per-method metrics

will collect more logs from production and stress test with logs pulled from loki API

Test plan

local run and verify on report

Benchmark results:
=== Overall Statistics ===
Total requests sent: 3
Total errors: 0
Average latency: 1360.67ms
Success rate: 100.0%

=== Per-Method Statistics ===
Method: sui_getLatestCheckpointSequenceNumber
  Requests: 1
  Errors: 0
  Avg latency: 1298.00ms
  Success rate: 100.0%
Method: sui_multiGetTransactionBlocks
  Requests: 1
  Errors: 0
  Avg latency: 1486.00ms
  Success rate: 100.0%
Method: suix_queryTransactionBlocks
  Requests: 1
  Errors: 0
  Avg latency: 1298.00ms
  Success rate: 100.0%

Release notes

Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required.

For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates.

  • Protocol:
  • Nodes (Validators and Full nodes):
  • gRPC:
  • JSON-RPC:
  • GraphQL:
  • CLI:
  • Rust SDK:

Copy link

vercel bot commented Jan 17, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sui-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 23, 2025 6:11am
2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
multisig-toolkit ⬜️ Ignored (Inspect) Visit Preview Jan 23, 2025 6:11am
sui-kiosk ⬜️ Ignored (Inspect) Visit Preview Jan 23, 2025 6:11am

stream.try_for_each_spawned(concurrency, |fut| fut),
)
.await
.unwrap_or(Ok(()))?;
Copy link
Contributor

Choose a reason for hiding this comment

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

Is .unwrap_or(Ok(()) basically unwrap()?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

not really, per the timeout doc

/// If the future completes before the duration has elapsed, then the completed
/// value is returned. Otherwise, an error is returned and the future is
/// canceled.

so .unwrap_or(Ok(()) intends to catch the early-termination-error and exit gracefully instead of panic right away -- meanwhile propagating the errors from try_for_each_spawned if anything

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.

2 participants