File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change 3
3
## Unreleased
4
4
### Added
5
5
- ` measureme ` : Added support for compiling the library under wasm/wasi ([ GH-43 ] )
6
+ - ` mmview ` : Added the ` -t ` flag to limit output to results on the specified thread id ([ GH-49 ] )
6
7
7
8
## [ 0.3.0] - 2019-05-14
8
9
### Added
23
24
[ GH-35 ] : https://github.com/rust-lang/measureme/pull/35
24
25
[ GH-41 ] : https://github.com/rust-lang/measureme/pull/41
25
26
[ GH-43 ] : https://github.com/rust-lang/measureme/pull/43
27
+ [ GH-49 ] : https://github.com/rust-lang/measureme/pull/49
Original file line number Diff line number Diff line change @@ -7,6 +7,10 @@ use structopt::StructOpt;
7
7
#[ derive( StructOpt , Debug ) ]
8
8
struct Opt {
9
9
file_prefix : PathBuf ,
10
+
11
+ /// Filter to events which occured on the specified thread id
12
+ #[ structopt( short = "t" , long = "thread-id" ) ]
13
+ thread_id : Option < u64 > ,
10
14
}
11
15
12
16
fn main ( ) -> Result < ( ) , Box < dyn Error > > {
@@ -15,6 +19,12 @@ fn main() -> Result<(), Box<dyn Error>> {
15
19
let data = ProfilingData :: new ( & opt. file_prefix ) ?;
16
20
17
21
for event in data. iter ( ) {
22
+ if let Some ( thread_id) = opt. thread_id {
23
+ if event. thread_id != thread_id {
24
+ continue ;
25
+ }
26
+ }
27
+
18
28
println ! ( "{:?}" , event) ;
19
29
}
20
30
You can’t perform that action at this time.
0 commit comments