Skip to content

Commit

Permalink
info: Show CPU count
Browse files Browse the repository at this point in the history
```
$ rbperf info

System info
-----------
Kernel release: 6.4.6-200.fc38.x86_64
Debugfs mounted: true
CPU count: 12

BPF features
------------
is jited: true
has stats: true
has tail_call: true
has ringbuf: true
has bpf_loop: true
```

Signed-off-by: Francisco Javier Honduvilla Coto <javierhonduco@gmail.com>
  • Loading branch information
javierhonduco committed Aug 20, 2023
1 parent 1ab6052 commit 7cff5ac
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ fn main() -> Result<()> {
println!("-----------");
println!("Kernel release: {}", info.system.os_release);
println!("Debugfs mounted: {}", info.system.debug_fs);
println!("CPU count: {}", num_cpus::get());
println!();

println!("BPF features");
Expand Down
2 changes: 1 addition & 1 deletion src/rbperf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ use crate::{
ruby_stack_status_STACK_INCOMPLETE, ProcessData, RubyStack, RBPERF_STACK_READING_PROGRAM_IDX,
};

extern crate num_cpus;
use num_cpus;

#[derive(Clone)]
pub enum RbperfEvent {
Expand Down

0 comments on commit 7cff5ac

Please sign in to comment.