Explorar o código

show hit rate to 2dp only

Brian Gough %!s(int64=11) %!d(string=hai) anos
pai
achega
ed33cd59b7
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      services/spelling/app/coffee/ASpell.coffee

+ 1 - 1
services/spelling/app/coffee/ASpell.coffee

@@ -38,7 +38,7 @@ class ASpellRunner
 			for k, v of addToCache
 				cache.set(k, v)
 
-			logger.log hits: hits, total: words.length, hitrate: hits/words.length, "cache hit rate"
+			logger.log hits: hits, total: words.length, hitrate: (hits/words.length).toFixed(2), "cache hit rate"
 			callback null, results
 
 	getSuggestions: (language, output) ->