-
Notifications
You must be signed in to change notification settings - Fork 758
feat(admin): Add admin v3 API routes and profiling endpoints for RustFS #774
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
Conversation
* feat: optimize AI rules with unified .rules.md and entry points - Create .rules.md as the central AI coding rules file - Add .copilot-rules.md as GitHub Copilot entry point - Add CLAUDE.md as Claude AI entry point - Incorporate principles from rustfs.com project - Add three critical rules: 1. Use English for all code comments and documentation 2. Clean up temporary scripts after use 3. Only make confident modifications * Update CLAUDE.md --------- Co-authored-by: Cursor Agent <[email protected]>
* Checkpoint before follow-up message Co-authored-by: anzhengchao <[email protected]> * Translate project documentation and comments from Chinese to English Co-authored-by: anzhengchao <[email protected]> * Fix typo: "unparseable" to "unparsable" in version test comment Co-authored-by: anzhengchao <[email protected]> * Refactor compression test code with minor syntax improvements Co-authored-by: anzhengchao <[email protected]> --------- Co-authored-by: Cursor Agent <[email protected]>
…ows systems (#353) (#343) (#403) Co-authored-by: 安正超 <[email protected]>
…ofile # Conflicts: # Cargo.lock # Cargo.toml # cli/rustfs-gui/src/components/home.rs # cli/rustfs-gui/src/components/navbar.rs # cli/rustfs-gui/src/components/setting.rs # cli/rustfs-gui/src/utils/config.rs # cli/rustfs-gui/src/utils/helper.rs # cli/rustfs-gui/src/utils/logger.rs # rustfs/src/admin/mod.rs # rustfs/src/main.rs # scripts/run.sh
Co-authored-by: houseme <[email protected]>
Co-authored-by: houseme <[email protected]>
…lback Co-authored-by: houseme <[email protected]>
…solution Co-authored-by: houseme <[email protected]>
…ot/fix-504 * 'copilot/fix-504' of github.com:rustfs/rustfs: feat: Implement hickory-resolver with TLS support for enhanced DNS resolution # Conflicts: # Cargo.toml
…re/linux-profile # Conflicts: # Cargo.toml
…ofile # Conflicts: # Cargo.lock # Cargo.toml
…s/rustfs into feature/linux-profile # Conflicts: # Cargo.lock # rustfs/src/admin/handlers.rs
…ofile # Conflicts: # CLAUDE.md # Cargo.lock # Cargo.toml # rustfs/Cargo.toml # rustfs/src/admin/handlers.rs # rustfs/src/admin/mod.rs # rustfs/src/admin/router.rs # rustfs/src/main.rs # scripts/run.sh
…ofile # Conflicts: # Cargo.lock # Cargo.toml # rustfs/Cargo.toml # rustfs/src/admin/router.rs # rustfs/src/main.rs
Replaces the existing pprof profiling endpoints with new trigger-based APIs for CPU and memory profiling. This change simplifies the handler logic by moving the profiling implementation to a dedicated module. A new handler file `admin/handlers/profile.rs` is created to contain the logic for these new endpoints. The core profiling functions are now expected to be in the `profiling` module, which the new handlers call to generate and save profile data.
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.OpenSSF Scorecard
Scanned Files
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces comprehensive profiling capabilities for the RustFS project, enabling both CPU and memory profiling with multiple modes and HTTP endpoints for on-demand profiling.
- Adds jemalloc memory allocator with profiling support for non-Windows platforms
- Implements CPU profiling with continuous and periodic modes using pprof
- Adds memory profiling using jemalloc's native profiling capabilities
- Provides HTTP endpoints
/profile/cpuand/profile/memoryfor on-demand profile dumps
Reviewed Changes
Copilot reviewed 16 out of 17 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/run.sh | Adds jemalloc profiling configuration and switches to profiling build profile |
| rustfs/src/profiling.rs | Complete rewrite adding CPU/memory profiling with multiple modes and jemalloc integration |
| rustfs/src/main.rs | Updates profiling initialization to use new async API and adds commented malloc_conf |
| rustfs/src/admin/router.rs | Adds profile endpoints to unauthenticated routes for easy access |
| rustfs/src/admin/mod.rs | Registers new CPU and memory profile trigger handlers |
| rustfs/src/admin/handlers/profile.rs | New file implementing HTTP handlers for CPU and memory profiling triggers |
| rustfs/src/admin/handlers.rs | Updates ProfileHandler to use new profiling API, adds profile module |
| rustfs/Cargo.toml | Adds jemalloc-related dependencies for profiling on non-Windows platforms |
| crates/config/src/lib.rs | Exports profiler constants module |
| crates/config/src/constants/profiler.rs | New file defining profiling configuration constants and defaults |
| crates/config/src/constants/mod.rs | Adds profiler module |
| crates/config/src/constants/app.rs | Changes default log rotation from daily to hourly |
| Cargo.toml | Adds workspace-level dependencies for jemalloc profiling and pprof |
| Cargo.lock | Updates lock file with new profiling dependencies |
| CLAUDE.md | Documentation updates for formatting and project guidelines |
| .rules.md | New comprehensive AI coding rules and guidelines document |
| .copilot-rules.md | New GitHub Copilot-specific configuration referencing main rules |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 16 out of 17 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 16 out of 17 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Type of Change
Related Issues
Summary of Changes
Checklist
make pre-commitImpact
Additional Notes
Thank you for your contribution! Please ensure your PR follows the community standards (CODE_OF_CONDUCT.md) and sign the CLA if this is your first contribution.