Commit 2c5aafc
Saied Kazemi
Use the shx package instead of the pipe package (#107)
* Use the shx package instead of the pipe package
The pipe package (gopkg.in/m-lab/pipe.v3) doesn't work as expected
because not only it doesn't support contexts its RunTimeout()
method does not correctly timeout. As a result, the latency
numbers cannot be trusted.
This commit replaces the pipe package with the shx package in the
ScamperDaemon.trace(). Once we have validated the new code works
as expected, the Scamper.trace() will also use the shx package.
Because there are multiple traces being performed in parallel,
the new code improves log messages by including the context
identifier so individual contexts can be easily identified.
Tested the changes locally using docker-compose.
* Change the exepcted error message in scamper_test.go
* Remove unnecessary variable declaration
* Remove the remaining references to the pipe package
This commit removes the remaining references to the pipe package
and simplifies the code that uses the shx package.
This commit also adds some flags to make it easier to configure
scamper without having to edit code and rebuild traceroute-caller
for different configurations. Specifically, "-O ptr" can be
enabled/disabled and tracelb's "-W" flag can be specified.
Run "./traceroute-caller -h" and/or see docker-compose.yaml for
an example of running with values different than the defaults.
The changes were tested locally with "go test ./..." and
docker-compose.
* Make changes suggested in code review1 parent a247b63 commit 2c5aafc
File tree
7 files changed
+218
-62
lines changed- tracer
7 files changed
+218
-62
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
44 | 50 | | |
45 | 51 | | |
46 | 52 | | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
51 | 59 | | |
52 | 60 | | |
53 | 61 | | |
| |||
77 | 85 | | |
78 | 86 | | |
79 | 87 | | |
80 | | - | |
81 | | - | |
82 | | - | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
83 | 93 | | |
84 | 94 | | |
85 | 95 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | 6 | | |
8 | 7 | | |
9 | 8 | | |
10 | | - | |
11 | | - | |
| 9 | + | |
12 | 10 | | |
13 | 11 | | |
14 | 12 | | |
| |||
0 commit comments