func AddFn(a, b int) int
func DirectCall() bool
func ExerciseFuncClosure(iter int, a1, a2 AddFunc, m1, m2 mult.MultFunc) int
ExerciseFuncClosure calls mostly a1 and m1.
This is a simplified version of ExerciseFuncConcrete, but we need two distinct call sites to test two different types of function values.
func ExerciseFuncConcrete(iter int, a1, a2 AddFunc, m1, m2 mult.MultFunc) int
ExerciseFuncConcrete calls mostly a1 and m1.
func ExerciseFuncField(iter int, a1, a2 AddFunc, m1, m2 mult.MultFunc) int
ExerciseFuncField calls mostly a1 and m1.
This is a simplified version of ExerciseFuncConcrete, but accessing the function values via a struct field.
func ExerciseIface(iter int, a1, a2 Adder, m1, m2 mult.Multiplier) int
ExerciseIface calls mostly a1 and m1.
func ExerciseIfaceZeroWeight()
ExerciseIfaceZeroWeight never calls IfaceZeroWeight, so the callee is not expected to appear in the profile.
func ExerciseIndirCallZeroWeight()
ExerciseIndirCallZeroWeight never calls IndirCallZeroWeight, so the callee is not expected to appear in the profile.
func IfaceZeroWeight(a *Add, b Adder) bool
func IndirCallZeroWeight(indirectCall func() bool) bool
func IndirectCall() bool
func SubFn(a, b int) int
type Add struct{}
func (Add) Add(a, b int) int
type AddFunc func(int, int) int
func AddClosure() AddFunc
func SubClosure() AddFunc
type Adder interface { Add(a, b int) int }
type Sub struct{}
func (Sub) Add(a, b int) int
Name | Synopsis |
---|---|
.. |