mirror of
https://github.com/rustfs/rustfs.git
synced 2026-01-16 17:20:33 +00:00
add workflow Samply action and modify console address port 9001
This commit is contained in:
37
.github/workflows/samply.yml
vendored
Normal file
37
.github/workflows/samply.yml
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
name: Profile with Samply
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
jobs:
|
||||
profile:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: dtolnay/rust-toolchain@nightly
|
||||
with:
|
||||
components: llvm-tools-preview
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
~/.cargo/registry
|
||||
~/.cargo/git
|
||||
target
|
||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
||||
- run: cargo install samply
|
||||
- run: echo '1' | sudo tee /proc/sys/kernel/perf_event_paranoid
|
||||
- name: Create test volumes
|
||||
run: |
|
||||
for i in {0..4}; do
|
||||
mkdir -p ./target/volume/test$i
|
||||
done
|
||||
- name: Set RUSTFS_VOLUMES
|
||||
run: |
|
||||
export RUSTFS_VOLUMES="./target/volume/test{0...4}"
|
||||
echo "RUSTFS_VOLUMES=$RUSTFS_VOLUMES" >> $GITHUB_ENV
|
||||
- run: echo "RUSTFS_VOLUMES is $RUSTFS_VOLUMES" # Debug output
|
||||
- run: RUSTFLAGS="-C force-frame-pointers=yes" cargo +nightly build --profile profiling -p rustfs --bins
|
||||
- run: samply record --output profile.json ./target/profiling/rustfs ${RUSTFS_VOLUMES}
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: samply-profile
|
||||
path: profile.json
|
||||
4
.gitignore
vendored
4
.gitignore
vendored
@@ -14,4 +14,6 @@ deploy/config/obs.toml
|
||||
deploy/certs/*
|
||||
*jsonl
|
||||
.env
|
||||
.rustfs.sys
|
||||
.rustfs.sys
|
||||
.cargo
|
||||
profile.json
|
||||
@@ -218,3 +218,7 @@ strip = true # strip symbol information to reduce binary size
|
||||
inherits = "release"
|
||||
lto = "fat"
|
||||
codegen-units = 1
|
||||
|
||||
[profile.profiling]
|
||||
inherits = "release"
|
||||
debug = true
|
||||
@@ -84,7 +84,7 @@ pub const DEFAULT_ADDRESS: &str = concat!(":", DEFAULT_PORT);
|
||||
|
||||
/// Default port for rustfs console
|
||||
/// This is the default port for rustfs console.
|
||||
pub const DEFAULT_CONSOLE_PORT: u16 = 9002;
|
||||
pub const DEFAULT_CONSOLE_PORT: u16 = 9001;
|
||||
|
||||
/// Default address for rustfs console
|
||||
/// This is the default address for rustfs console.
|
||||
|
||||
Reference in New Issue
Block a user