Explorar o código

Use an explicit prefix

Shane Kilkelly %!s(int64=9) %!d(string=hai) anos
pai
achega
e7f71a25d8
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      libraries/metrics/timeAsyncMethod.coffee

+ 2 - 2
libraries/metrics/timeAsyncMethod.coffee

@@ -1,12 +1,12 @@
 
-module.exports = (obj, methodName, key, logger) ->
+module.exports = (obj, methodName, prefix, logger) ->
 	metrics = require('./metrics')
 
 	if typeof obj[methodName] != 'function'
 		throw new Error("[Metrics] expected object property '#{methodName}' to be a function")
 
 	realMethod = obj[methodName]
-	key = "methods.#{key}"
+	key = "#{prefix}.#{methodName}"
 
 	obj[methodName] = (originalArgs...) ->