github.com/cilium/cilium@v1.16.2/pkg/policy/api/decision_test.go (about) 1 // SPDX-License-Identifier: Apache-2.0 2 // Copyright Authors of Cilium 3 4 package api 5 6 import ( 7 "testing" 8 ) 9 10 func BenchmarkDecisionMarshalJSON(b *testing.B) { 11 b.ReportAllocs() 12 b.ResetTimer() 13 for i := 0; i < b.N; i++ { 14 for _, d := range []Decision{ 15 Undecided, 16 Allowed, 17 Denied, 18 } { 19 _, _ = d.MarshalJSON() 20 } 21 } 22 }