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

Function TestTopTable

browsertests/browser_test.go:50–72  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

48}
49
50func TestTopTable(t *testing.T) {
51 maybeSkipBrowserTest(t)
52
53 prof := makeFakeProfile()
54 server := makeTestServer(t, prof)
55 ctx := newContext(context.Background(), t)
56
57 err := chromedp.Run(ctx,
58 chromedp.Navigate(server.URL+"/top"),
59 chromedp.WaitVisible(`#toptable`, chromedp.ByID),
60
61 // Check that fake profile entries show up in the right order.
62 matchRegexp(t, "#node0", `200ms.*F2`),
63 matchInOrder(t, "#toptable", "F2", "F3", "F1"),
64
65 // Check sorting by cumulative count.
66 chromedp.Click(`#cumhdr1`, chromedp.ByID),
67 matchInOrder(t, "#toptable", "F1", "F2", "F3"),
68 )
69 if err != nil {
70 t.Fatal(err)
71 }
72}
73
74func TestFlameGraph(t *testing.T) {
75 maybeSkipBrowserTest(t)

Callers

nothing calls this directly

Calls 6

maybeSkipBrowserTestFunction · 0.85
newContextFunction · 0.85
matchRegexpFunction · 0.85
matchInOrderFunction · 0.85
makeFakeProfileFunction · 0.70
makeTestServerFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…