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

Function TestThreadSafety

profile/profile_test.go:1907–1918  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1905}
1906
1907func TestThreadSafety(t *testing.T) {
1908 src := testProfile1.Copy()
1909 parallel(4, func() { src.Copy() })
1910 parallel(4, func() {
1911 var b bytes.Buffer
1912 src.WriteUncompressed(&b)
1913 })
1914 parallel(4, func() {
1915 var b bytes.Buffer
1916 src.Write(&b)
1917 })
1918}
1919
1920func BenchmarkParse(b *testing.B) {
1921 data := proftest.LargeProfile(b)

Callers

nothing calls this directly

Calls 4

parallelFunction · 0.85
CopyMethod · 0.80
WriteUncompressedMethod · 0.80
WriteMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…