ceph-csi/e2e/vendor/github.com/antlr4-go/antlr/v4/nostatistics.go
Niels de Vos bec6090996 build: move e2e dependencies into e2e/go.mod
Several packages are only used while running the e2e suite. These
packages are less important to update, as the they can not influence the
final executable that is part of the Ceph-CSI container-image.

By moving these dependencies out of the main Ceph-CSI go.mod, it is
easier to identify if a reported CVE affects Ceph-CSI, or only the
testing (like most of the Kubernetes CVEs).

Signed-off-by: Niels de Vos <ndevos@ibm.com>
2025-03-07 16:05:04 +00:00

48 lines
1.2 KiB
Go

//go:build !antlr.stats
package antlr
// This file is compiled when the build configuration antlr.stats is not enabled.
// which then allows the compiler to optimize out all the code that is not used.
const collectStats = false
// goRunStats is a dummy struct used when build configuration antlr.stats is not enabled.
type goRunStats struct {
}
var Statistics = &goRunStats{}
func (s *goRunStats) AddJStatRec(_ *JStatRec) {
// Do nothing - compiler will optimize this out (hopefully)
}
func (s *goRunStats) CollectionAnomalies() {
// Do nothing - compiler will optimize this out (hopefully)
}
func (s *goRunStats) Reset() {
// Do nothing - compiler will optimize this out (hopefully)
}
func (s *goRunStats) Report(dir string, prefix string) error {
// Do nothing - compiler will optimize this out (hopefully)
return nil
}
func (s *goRunStats) Analyze() {
// Do nothing - compiler will optimize this out (hopefully)
}
type statsOption func(*goRunStats) error
func (s *goRunStats) Configure(options ...statsOption) error {
// Do nothing - compiler will optimize this out (hopefully)
return nil
}
func WithTopN(topN int) statsOption {
return func(s *goRunStats) error {
return nil
}
}