Open
Conversation
…timization (rinafcode#167) - Add gas usage benchmarks for all contract operations (bridge, consensus, tokenization, notifications, audit, mobile platform) - Implement gas regression thresholds with per-operation limits - Add baseline tracking and regression detection (10% critical, 5% warning) - Add GitHub Actions workflow for automated performance testing on PRs - Add Python benchmark runner for CI/CD integration and report generation - Add shell benchmark script for local development - Extend Rust benchmark runner with gas tracking capabilities - Export ContentType from lib.rs for test usage - All 14 gas benchmark tests pass with operations well within thresholds
Add gas usage benchmarks Monitor performance over time Set performance regression thresholds Automate performance testing
|
Please update your PR title to follow the conventional commit format: Types: feat, fix, docs, style, refactor, test, chore, perf, ci, build, revert Examples:
See CONTRIBUTING.md for details. |
|
🎉 Welcome to TeachLink, @uzochukwuV! Thank you for your first contribution! A maintainer will review your PR soon. While you wait:
We appreciate your contribution to decentralized education! 🎓 |
|
@uzochukwuV Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #167
Summary
Changes
Gas Benchmark Tests (
contracts/teachlink/tests/test_gas_benchmarks.rs)Thresholds & Baselines
gas_thresholds.json- Defines max instructions, memory bytes, and WASM size limits for every operation category (bridge, cache, consensus, tokenization, rewards, messaging, notifications, mobile, audit)gas_baseline.json- Tracks baseline gas usage for regression comparison (10% critical, 5% warning)CI/CD Automation (
.github/workflows/performance.yml)mainand PRs touchingcontracts/**,gas_thresholds.json, orgas_baseline.jsonSupporting Scripts
scripts/run_gas_benchmarks.py- Parses benchmark output, compares with baseline, generates JSON reportsscripts/benchmark.sh- Local development benchmark runner with WASM size checkstesting/performance/benchmark_runner.rs- Extended withGasBenchmarkResulttracking, threshold comparison, and baseline diffingTest Results
All 14 gas benchmarks pass with operations well within thresholds:
Acceptance Criteria