]> Cypherpunks repositories - gostls13.git/commitdiff
runtime/pprof: delete new TestCPUProfileParse
authorRuss Cox <rsc@golang.org>
Fri, 11 Nov 2016 16:25:15 +0000 (11:25 -0500)
committerRuss Cox <rsc@golang.org>
Fri, 11 Nov 2016 16:59:01 +0000 (16:59 +0000)
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: Brad Fitzpatrick <bradfitz@golang.org>
src/runtime/pprof/pprof_test.go

index c19ea3507d1ac38171c6c09e389cbd5f8e3ea393..eb8fcc90dbd8dfbafb45a42e65b535b47687e75e 100644 (file)
@@ -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)
-       }
-}