* Avoid opening browser when not in terminal This also reverts e82ee9a, though only in spirit since the revert did not apply cleanly. This change may look cosmetic, but note that `plugin.UI` can be passed in from the outside. This is important for embedding pprof into an application for easy access to the web ui: with this change, such an application can pass a non-Terminal `profile.UI` and avoids the browser code. * Allow passing in a custom HTTPServer This allows embedding the pprof ui into an existing application. See https://github.com/cockroachdb/cockroach/pull/24145 for an example.
|
||
41 | 41 |
|
42 | 42 |
|
43 | 43 |
|
44 |
|
|
45 |
|
|
46 |
|
|
47 |
|
|
48 |
|
|
49 |
|
|
44 | 50 |
|
45 |
|
|
46 |
|
|
47 |
|
|
48 |
|
|
49 |
|
|
50 |
|
|
51 |
|
|
52 |
|
|
53 |
|
|
54 |
|
|
55 |
|
|
56 |
|
|
57 |
|
|
51 | 58 |
|
52 | 59 |
|
53 | 60 |
|
61 |
|
|
62 |
|
|
63 |
|
|
64 |
|
|
54 | 65 |
|
55 | 66 |
|
56 |
|
|
57 |
|
|
58 |
|
|
59 |
|
|
60 |
|
|
61 |
|
|
67 |
|
|
68 |
|
|
69 |
|
|
70 |
|
|
71 |
|
|
72 |
|
|
73 |
|
|
62 | 74 |
|
63 | 75 |
|
64 | 76 |
|
|
||
54 | 54 |
|
55 | 55 |
|
56 | 56 |
|
57 |
|
|
57 |
|
|
58 | 58 |
|
59 | 59 |
|
60 | 60 |
|
|
||
82 | 82 |
|
83 | 83 |
|
84 | 84 |
|
85 |
|
|
85 |
|
|
86 | 86 |
|
87 | 87 |
|
88 | 88 |
|
|
||
117 | 117 |
|
118 | 118 |
|
119 | 119 |
|
120 |
|
|
120 |
|
|
121 | 121 |
|
122 | 122 |
|
123 | 123 |
|
|
||
31 | 31 |
|
32 | 32 |
|
33 | 33 |
|
34 |
|
|
35 |
|
|
36 |
|
|
37 |
|
|
38 |
|
|
39 |
|
|
34 | 40 |
|
35 | 41 |
|
36 | 42 |
|
|
||
55 | 61 |
|
56 | 62 |
|
57 | 63 |
|
58 |
|
|
64 |
|
|
59 | 65 |
|
60 |
|
|
66 |
|
|
61 | 67 |
|
62 | 68 |
|
63 | 69 |
|