• Charlie Vieth's avatar
    Fix log plugin benchmark and slightly improve performance (#3004) · 21e9c604
    Charlie Vieth authored
    * log: use ioutil.Discard as write buffer in benchmark
    
    Using a buffer gives unrealistic stats and consumes a large amount of
    memory.
    
    * log: lazily check if a msg should be logged
    
    * log: improve variable name
    
    Change 'ok' to the more descriptive 'shouldLog'.
    
    * log: code comments: don't reuse variable
    21e9c604
log.go 2.04 KB