Skip to content

Commit 3996f23

Browse files
committed
exit probe early if dtrace
1 parent 3b9c3d8 commit 3996f23

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
Minimum overhead USDT middleware to dynamically trace tide with BPF or Dtrace.
44

55
```
6-
$ sudo bpftrace -p $(pgrep histogram) tools/route-histogram.bt
6+
$ cargo run --examples histogram
7+
$ sudo bpftrace -p $(pgrep histogram) tools/route-histogram.bt
8+
$ curl http://localhost:8080/route1 && curl http://localhost:8080/route2
9+
710
Attaching 2 probes...
811
^C
912
@us[GET, /favicon.ico]:

tests/probe.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ if [[ "$OSTYPE" == "linux-gnu"* ]]; then
99
trace=$!
1010
else
1111
echo "${$OSTYPE} : unsupported OS"
12+
exit
1213
fi
1314

1415
sleep 2

0 commit comments

Comments
 (0)