|
@@ -26,13 +26,14 @@ import (
|
26
|
26
|
|
27
|
27
|
func TestSymbolzURL(t *testing.T) {
|
28
|
28
|
for try, want := range map[string]string{
|
29
|
|
- "http://host:8000/profilez": "http://host:8000/symbolz",
|
30
|
|
- "http://host:8000/profilez?seconds=5": "http://host:8000/symbolz",
|
31
|
|
- "http://host:8000/profilez?seconds=5&format=proto": "http://host:8000/symbolz",
|
32
|
|
- "http://host:8000/heapz?format=legacy": "http://host:8000/symbolz",
|
33
|
|
- "http://host:8000/debug/pprof/profile": "http://host:8000/debug/pprof/symbol",
|
34
|
|
- "http://host:8000/debug/pprof/profile?seconds=10": "http://host:8000/debug/pprof/symbol",
|
35
|
|
- "http://host:8000/debug/pprof/heap": "http://host:8000/debug/pprof/symbol",
|
|
29
|
+ "http://host:8000/profilez": "http://host:8000/symbolz",
|
|
30
|
+ "http://host:8000/profilez?seconds=5": "http://host:8000/symbolz",
|
|
31
|
+ "http://host:8000/profilez?seconds=5&format=proto": "http://host:8000/symbolz",
|
|
32
|
+ "http://host:8000/heapz?format=legacy": "http://host:8000/symbolz",
|
|
33
|
+ "http://host:8000/debug/pprof/profile": "http://host:8000/debug/pprof/symbol",
|
|
34
|
+ "http://host:8000/debug/pprof/profile?seconds=10": "http://host:8000/debug/pprof/symbol",
|
|
35
|
+ "http://host:8000/debug/pprof/heap": "http://host:8000/debug/pprof/symbol",
|
|
36
|
+ "http://some.host:8080/some/deeper/path/debug/pprof/endpoint?param=value": "http://some.host:8080/some/deeper/path/debug/pprof/symbol",
|
36
|
37
|
} {
|
37
|
38
|
if got := symbolz(try); got != want {
|
38
|
39
|
t.Errorf(`symbolz(%s)=%s, want "%s"`, try, got, want)
|