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

feat(e2e): add latency report to withdrawal performance tests #3071

Merged
merged 3 commits into from
Oct 31, 2024

Conversation

gartnera
Copy link
Member

@gartnera gartnera commented Oct 30, 2024

Description

Add basic latency report to e2e stdout output:

perf_eth_w | index 83: withdraw cctx success in 2m14.816615704s
perf_eth_w | Latency report:
perf_eth_w | min:  11.54
perf_eth_w | max:  144.94
perf_eth_w | mean: 80.86
perf_eth_w | std:  35.27
perf_eth_w | p50:  73.83
perf_eth_w | p75:  107.65
perf_eth_w | p90:  132.86
perf_eth_w | p95:  139.84
perf_eth_w | all withdraws completed
perf_eth_w | ✅ completed in 5m36.469992612s - stress test Ether withdrawal
perf_eth_w | 🍾 Ethereum withdraw performance test completed in 5m48.522626564s

Also increase the cctx polling interval to improve stats accuracy

Related to https://github.com/zeta-chain/infrastructure/issues/1765

Future TODO:

  • write this data out in a structured format and compare to info from previous nightly and/or release
  • add more generic way to do this throughout e2e suite

How Has This Been Tested?

  • Tested CCTX in localnet
  • Tested in development environment
  • Go unit tests
  • Go integration tests
  • Tested via GitHub Actions

Summary by CodeRabbit

  • New Features

    • Enhanced stress testing for Ether withdrawal with detailed latency metrics and improved error handling.
  • Bug Fixes

    • Adjusted timing and logging mechanisms for cross-chain transaction monitoring to optimize performance.
  • Chores

    • Updated and added dependencies to ensure compatibility with newer library versions and improve project stability.

Copy link
Contributor

coderabbitai bot commented Oct 30, 2024

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

📝 Walkthrough
📝 Walkthrough

Walkthrough

The pull request introduces significant updates to the TestStressEtherWithdraw function in the e2etests/test_stress_eth_withdraw.go file, integrating a synchronization mechanism for concurrent withdrawal duration tracking. The monitoring logic has been streamlined, with error handling improvements. In e2e/utils/zetacore.go, adjustments to timing and logging mechanisms optimize transaction monitoring. The go.mod file reflects updates to dependencies, including the addition of a new indirect dependency and various version updates, ensuring compatibility and addressing specific module issues.

Changes

File Path Change Summary
e2e/e2etests/test_stress_eth_withdraw.go Modified TestStressEtherWithdraw to include synchronization with sync.Mutex, integrated withdrawal monitoring logic, and enhanced error handling.
e2e/utils/zetacore.go Reduced sleep duration in transaction monitoring functions and adjusted logging frequency for errors and status updates.
go.mod Added new indirect dependency github.com/montanaflynn/stats v0.7.1, updated existing dependencies, and modified replacement directives for various modules.

Possibly related PRs

Suggested labels

V2_TESTS, UPGRADE_TESTS

Suggested reviewers

  • skosito
  • kingpinXD
  • brewmaster012
  • swift1337
  • ws4charlie
  • fbac

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@gartnera gartnera added the PERFORMANCE_TESTS Run make start-e2e-performance-test label Oct 30, 2024
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 5

🧹 Outside diff range and nitpick comments (2)
e2e/utils/zetacore.go (1)

Line range hint 1-300: Consider implementing metrics collection for performance analysis.

Given that this code is part of performance testing utilities and the PR aims to add latency reporting, consider adding instrumentation to track:

  • Time spent waiting for transactions
  • Distribution of retry attempts
  • Success/failure rates

This would provide valuable insights for performance optimization and help identify bottlenecks.

go.mod (1)

Line range hint 375-380: Consider documenting the rationale for replace directives.

The replace directives for core dependencies like gogo/protobuf and confio/ics23/go are using specific versions. Consider adding comments explaining why these specific versions are required to help future maintainers.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 6ef5c57 and c42d3e7.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (3)
  • e2e/e2etests/test_stress_eth_withdraw.go (3 hunks)
  • e2e/utils/zetacore.go (3 hunks)
  • go.mod (1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
e2e/e2etests/test_stress_eth_withdraw.go (1)

Pattern **/*.go: Review the Go code, point out issues relative to principles of clean code, expressiveness, and performance.

e2e/utils/zetacore.go (1)

Pattern **/*.go: Review the Go code, point out issues relative to principles of clean code, expressiveness, and performance.

🔇 Additional comments (2)
go.mod (2)

343-343: LGTM: Stats package addition aligns with PR objectives.

The addition of github.com/montanaflynn/stats v0.7.1 is appropriate for implementing the latency reporting feature, as it provides the necessary statistical functions for calculating metrics like mean, standard deviation, and percentiles.


Line range hint 391-396: Verify the impact of ZetaChain fork updates.

The replace directives point to ZetaChain-maintained forks with specific commits. While this is a valid approach, it's important to ensure these updates don't introduce breaking changes.

e2e/utils/zetacore.go Show resolved Hide resolved
e2e/utils/zetacore.go Show resolved Hide resolved
e2e/e2etests/test_stress_eth_withdraw.go Show resolved Hide resolved
e2e/e2etests/test_stress_eth_withdraw.go Show resolved Hide resolved
e2e/e2etests/test_stress_eth_withdraw.go Outdated Show resolved Hide resolved
Copy link
Member

@lumtis lumtis left a comment

Choose a reason for hiding this comment

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

Interesting

@gartnera gartnera enabled auto-merge October 31, 2024 16:22
@gartnera gartnera added this pull request to the merge queue Oct 31, 2024
Merged via the queue into develop with commit 146f443 Oct 31, 2024
30 checks passed
@gartnera gartnera deleted the perf-tests-latency-report branch October 31, 2024 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-changelog Skip changelog CI check PERFORMANCE_TESTS Run make start-e2e-performance-test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants