MCPcopy Create free account
hub / github.com/rabbitstack/fibratus / TestStartTrace

Function TestStartTrace

internal/etw/trace_test.go:28–47  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

26)
27
28func TestStartTrace(t *testing.T) {
29 cfg := &config.Config{
30 EventSource: config.EventSourceConfig{
31 EnableThreadEvents: true,
32 EnableNetEvents: true,
33 EnableFileIOEvents: true,
34 BufferSize: 1024,
35 FlushTimer: time.Millisecond * 2300,
36 },
37 }
38
39 cfg.EventSource.Init()
40
41 trace := NewKernelTrace(cfg)
42 require.NoError(t, trace.Start())
43 require.True(t, trace.IsStarted())
44 defer trace.Stop()
45 require.Error(t, trace.Start())
46 require.True(t, trace.IsRunning())
47}

Callers

nothing calls this directly

Calls 7

NewKernelTraceFunction · 0.85
IsStartedMethod · 0.80
IsRunningMethod · 0.80
InitMethod · 0.45
StartMethod · 0.45
StopMethod · 0.45
ErrorMethod · 0.45

Tested by

no test coverage detected