go/src/cmd/trace/jsontrace_test.go

func TestJSONTraceHandler(t *testing.T) {}

func checkSyscalls(t *testing.T, data format.Data) {}

type eventFilterFn

func filterEventName(name string) eventFilterFn {}

// filterGoRoutineName returns an event filter that returns true if the event's
// goroutine name is equal to name.
func filterGoRoutineName(name string) eventFilterFn {}

// parseGoroutineName returns the goroutine name from the event's name field.
// E.g. if e.Name is "G42 main.cpu10", this returns "main.cpu10".
func parseGoroutineName(e *format.Event) string {}

// filterBlocked returns an event filter that returns true if the event's
// "blocked" argument is equal to blocked.
func filterBlocked(blocked string) eventFilterFn {}

// filterStackRootFunc returns an event filter that returns true if the function
// at the root of the stack trace is named name.
func filterStackRootFunc(name string) eventFilterFn {}

// filterViewerTrace returns a copy of data with only the events that pass all
// of the given filters.
func filterViewerTrace(data format.Data, fns ...eventFilterFn) (filtered format.Data) {}

func stackFrames(data *format.Data, stackID int) (frames []string) {}

func checkProcStartStop(t *testing.T, data format.Data) {}

func checkNetworkUnblock(t *testing.T, data format.Data) {}

func checkExecutionTimes(t *testing.T, data format.Data) {}

func checkMetaNamesEmitted(t *testing.T, data format.Data, category string, want []string) {}

func metaEventNameArgs(category string, data format.Data) (names []string) {}

func checkPlausibleHeapMetrics(t *testing.T, data format.Data) {}

func heapMetrics(data format.Data) (metrics []format.HeapCountersArg) {}

func recordJSONTraceHandlerResponse(t *testing.T, parsed *parsedTrace) format.Data {}

func sumExecutionTime(data format.Data) (sum time.Duration) {}

func getTestTrace(t *testing.T, testPath string) *parsedTrace {}