diff options
Diffstat (limited to 'debugoff.go')
-rw-r--r-- | debugoff.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/debugoff.go b/debugoff.go index 8eb4790..ba0ef33 100644 --- a/debugoff.go +++ b/debugoff.go @@ -2,10 +2,12 @@ package goparsify +// NewParser should be called around the creation of every Parser. +// It does nothing normally and should incur no runtime overhead, but when building with -tags debug +// it will instrument every parser to collect valuable timing information displayable with DumpDebugStats. func NewParser(description string, p Parser) Parser { return p } -func DumpDebugStats() { - -} +// DumpDebugStats will print out the curring timings for each parser if built with -tags debug +func DumpDebugStats() {} |