Skip to content

Conversation

@houseme
Copy link
Contributor

@houseme houseme commented Oct 31, 2025

Type of Change

  • New Feature
  • Bug Fix
  • Documentation
  • Performance Improvement
  • Test/CI
  • Refactor
  • Other:

Related Issues

Summary of Changes

Checklist

  • I have read and followed the CONTRIBUTING.md guidelines
  • Passed make pre-commit
  • Added/updated necessary tests
  • Documentation updated (if needed)
  • CI/CD passed (if applicable)

Impact

  • Breaking change (compatibility)
  • Requires doc/config/deployment update
  • Other impact:

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.

houseme and others added 30 commits August 13, 2025 23:19
* 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]>
…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
…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
…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.
@github-actions
Copy link

github-actions bot commented Oct 31, 2025

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails
cargo/env_filter 0.1.4 🟢 6.7
Details
CheckScoreReason
Code-Review⚠️ 1Found 1/9 approved changesets -- score normalized to 1
Maintained🟢 1021 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10
Binary-Artifacts🟢 10no binaries found in the repo
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Packaging⚠️ -1packaging workflow not detected
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Token-Permissions🟢 10GitHub workflow tokens follow principle of least privilege
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
Security-Policy⚠️ 0security policy file not detected
Fuzzing⚠️ 0project is not fuzzed
License🟢 10license file detected
Vulnerabilities🟢 100 existing vulnerabilities detected
Signed-Releases⚠️ -1no releases found
Branch-Protection⚠️ -1internal error: error during branchesHandler.setup: internal error: some github tokens can't read classic branch protection rules: https://github.com/ossf/scorecard-action/blob/main/docs/authentication/fine-grained-auth-token.md
SAST🟢 10SAST tool is run on all commits
cargo/env_logger 0.11.8 🟢 6.7
Details
CheckScoreReason
Code-Review⚠️ 1Found 1/9 approved changesets -- score normalized to 1
Maintained🟢 1021 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10
Binary-Artifacts🟢 10no binaries found in the repo
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Packaging⚠️ -1packaging workflow not detected
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Token-Permissions🟢 10GitHub workflow tokens follow principle of least privilege
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
Security-Policy⚠️ 0security policy file not detected
Fuzzing⚠️ 0project is not fuzzed
License🟢 10license file detected
Vulnerabilities🟢 100 existing vulnerabilities detected
Signed-Releases⚠️ -1no releases found
Branch-Protection⚠️ -1internal error: error during branchesHandler.setup: internal error: some github tokens can't read classic branch protection rules: https://github.com/ossf/scorecard-action/blob/main/docs/authentication/fine-grained-auth-token.md
SAST🟢 10SAST tool is run on all commits
cargo/inferno 0.12.3 🟢 5.3
Details
CheckScoreReason
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Maintained⚠️ 00 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 0
Packaging⚠️ -1packaging workflow not detected
Code-Review🟢 5Found 11/19 approved changesets -- score normalized to 5
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Token-Permissions🟢 10GitHub workflow tokens follow principle of least privilege
Binary-Artifacts🟢 10no binaries found in the repo
Fuzzing⚠️ 0project is not fuzzed
Security-Policy⚠️ 0security policy file not detected
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
License🟢 9license file detected
Signed-Releases⚠️ -1no releases found
Branch-Protection⚠️ -1internal error: error during branchesHandler.setup: internal error: some github tokens can't read classic branch protection rules: https://github.com/ossf/scorecard-action/blob/main/docs/authentication/fine-grained-auth-token.md
Vulnerabilities🟢 100 existing vulnerabilities detected
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
cargo/jemalloc_pprof 0.8.1 UnknownUnknown
cargo/mappings 0.7.1 UnknownUnknown
cargo/pprof_util 0.8.0 UnknownUnknown
cargo/prost 0.13.5 🟢 6.8
Details
CheckScoreReason
Code-Review⚠️ 2Found 8/29 approved changesets -- score normalized to 2
Packaging⚠️ -1packaging workflow not detected
Maintained🟢 1022 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Binary-Artifacts🟢 10no binaries found in the repo
Token-Permissions🟢 10GitHub workflow tokens follow principle of least privilege
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
Security-Policy⚠️ 0security policy file not detected
Fuzzing🟢 10project is fuzzed
License🟢 10license file detected
Vulnerabilities🟢 100 existing vulnerabilities detected
Signed-Releases⚠️ -1no releases found
Branch-Protection⚠️ -1internal error: error during branchesHandler.setup: internal error: some github tokens can't read classic branch protection rules: https://github.com/ossf/scorecard-action/blob/main/docs/authentication/fine-grained-auth-token.md
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
cargo/prost-derive 0.13.5 🟢 6.8
Details
CheckScoreReason
Code-Review⚠️ 2Found 8/29 approved changesets -- score normalized to 2
Packaging⚠️ -1packaging workflow not detected
Maintained🟢 1022 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Binary-Artifacts🟢 10no binaries found in the repo
Token-Permissions🟢 10GitHub workflow tokens follow principle of least privilege
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
Security-Policy⚠️ 0security policy file not detected
Fuzzing🟢 10project is fuzzed
License🟢 10license file detected
Vulnerabilities🟢 100 existing vulnerabilities detected
Signed-Releases⚠️ -1no releases found
Branch-Protection⚠️ -1internal error: error during branchesHandler.setup: internal error: some github tokens can't read classic branch protection rules: https://github.com/ossf/scorecard-action/blob/main/docs/authentication/fine-grained-auth-token.md
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
cargo/tikv-jemalloc-ctl 0.6.1 🟢 5.3
Details
CheckScoreReason
Code-Review🟢 9Found 29/30 approved changesets -- score normalized to 9
Maintained🟢 63 commit(s) and 5 issue activity found in the last 90 days -- score normalized to 6
Packaging⚠️ -1packaging workflow not detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Binary-Artifacts🟢 10no binaries found in the repo
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Security-Policy⚠️ 0security policy file not detected
Fuzzing⚠️ 0project is not fuzzed
Vulnerabilities🟢 100 existing vulnerabilities detected
License🟢 9license file detected
Signed-Releases⚠️ -1no releases found
Branch-Protection⚠️ -1internal error: error during branchesHandler.setup: internal error: some github tokens can't read classic branch protection rules: https://github.com/ossf/scorecard-action/blob/main/docs/authentication/fine-grained-auth-token.md
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0

Scanned Files

  • Cargo.lock
  • rustfs/Cargo.toml

@houseme houseme requested a review from Copilot October 31, 2025 18:11
Copy link
Contributor

Copilot AI left a 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/cpu and /profile/memory for 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.

@houseme houseme requested a review from Copilot October 31, 2025 18:30
Copy link
Contributor

Copilot AI left a 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.

@houseme houseme requested a review from Copilot October 31, 2025 18:43
Copy link
Contributor

Copilot AI left a 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.

@houseme houseme merged commit d30c42f into main Oct 31, 2025
16 checks passed
@houseme houseme deleted the feature/linux-profile branch October 31, 2025 19:16
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.

4 participants