Commit c4099c75 authored by Russ Cox's avatar Russ Cox

runtime/pprof: delete new TestCPUProfileParse

All the existing CPU profiler tests already parse the profile.
That should be sufficient indication that profiles can be parsed.

Fixes #17853.

Change-Id: Ie8a190e2ae4eef125c8eb0d4e8b7adac420abbdb
Reviewed-on: https://go-review.googlesource.com/33136
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
parent eafe4878
......@@ -651,23 +651,3 @@ func containsInOrder(s string, all ...string) bool {
}
return true
}
// Tests that the profiler outputs a parsable protobuf Profile profile.
func TestCPUProfileParse(t *testing.T) {
var before, after runtime.MemStats
runtime.ReadMemStats(&before)
var buf bytes.Buffer
if err := StartCPUProfile(&buf); err != nil {
t.Fatalf("Profile failed: Could not enable CPU profiling: %s\n", err)
}
time.Sleep(5 * time.Second)
StopCPUProfile()
runtime.ReadMemStats(&after)
_, err := profile.Parse(&buf)
if err != nil {
t.Fatalf("Could not parse Profile profile: %v", err)
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment