MCPcopy Create free account
hub / github.com/google/pprof / TestInteractiveCommands

Function TestInteractiveCommands

internal/driver/interactive_test.go:179–270  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

177}
178
179func TestInteractiveCommands(t *testing.T) {
180 type interactiveTestcase struct {
181 input string
182 want map[string]string
183 }
184
185 testcases := []interactiveTestcase{
186 {
187 "top 10 --cum focus1 -ignore focus2",
188 map[string]string{
189 "nodecount": "10",
190 "sort": "cum",
191 "focus": "focus1|focus2",
192 "ignore": "ignore",
193 },
194 },
195 {
196 "top10 --cum focus1 -ignore focus2",
197 map[string]string{
198 "nodecount": "10",
199 "sort": "cum",
200 "focus": "focus1|focus2",
201 "ignore": "ignore",
202 },
203 },
204 {
205 "dot",
206 map[string]string{
207 "nodecount": "80",
208 "sort": "flat",
209 },
210 },
211 {
212 "tags -ignore1 -ignore2 focus1 >out",
213 map[string]string{
214 "nodecount": "80",
215 "sort": "flat",
216 "output": "out",
217 "tagfocus": "focus1",
218 "tagignore": "ignore1|ignore2",
219 },
220 },
221 {
222 "weblist find -test",
223 map[string]string{
224 "granularity": "addresses",
225 "noinlines": "false",
226 "nodecount": "0",
227 "sort": "flat",
228 "ignore": "test",
229 },
230 },
231 {
232 "callgrind fun -ignore >out",
233 map[string]string{
234 "granularity": "addresses",
235 "nodecount": "0",
236 "sort": "flat",

Callers

nothing calls this directly

Calls 3

parseCommandLineFunction · 0.85
applyCommandOverridesFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…