diff options
author | Adam Scarr <adam@vektah.net> | 2017-08-09 21:18:14 +1000 |
---|---|---|
committer | Adam Scarr <adam@vektah.net> | 2017-08-09 21:19:41 +1000 |
commit | 47badae641b9cd8862f327864d2143a57b8e30af (patch) | |
tree | 930e6621051ec4da5e4fd028f98447e88978837d /debugoff.go | |
parent | 8b2f10f2384c1efe4492f68b055415be6ead3f0e (diff) |
Add godoc
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() {} |