]> Cypherpunks.ru repositories - gostls13.git/blob - src/cmd/compile/internal/test/testdata/pgo/devirtualize/devirt_test.go
ef637a876b0b69f63d2ed90d66718b64be6b5963
[gostls13.git] / src / cmd / compile / internal / test / testdata / pgo / devirtualize / devirt_test.go
1 // Copyright 2023 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
4
5 // WARNING: Please avoid updating this file. If this file needs to be updated,
6 // then a new devirt.pprof file should be generated:
7 //
8 //      $ cd $GOROOT/src/cmd/compile/internal/test/testdata/pgo/devirtualize/
9 //      $ go mod init example.com/pgo/devirtualize
10 //      $ go test -bench=. -cpuprofile ./devirt.pprof
11
12 package devirt
13
14 import (
15         "testing"
16
17         "example.com/pgo/devirtualize/mult.pkg"
18 )
19
20 func BenchmarkDevirt(b *testing.B) {
21         var (
22                 a1 Add
23                 a2 Sub
24                 m1 mult.Mult
25                 m2 mult.NegMult
26         )
27
28         Exercise(b.N, a1, a2, m1, m2)
29 }