Răsfoiți Sursa

log profilers start and end times for reference

Brian Gough 9 ani în urmă
părinte
comite
e00f4dde8e
1 a modificat fișierele cu 3 adăugiri și 0 ștergeri
  1. 3 0
      services/document-updater/app/coffee/Profiler.coffee

+ 3 - 0
services/document-updater/app/coffee/Profiler.coffee

@@ -9,6 +9,7 @@ module.exports = class Profiler
 
 	constructor: (@name, @args) ->
 		@t0 = @t = process.hrtime()
+		@start = new Date()
 		@updateTimes = []
 
 	log: (label) ->
@@ -25,4 +26,6 @@ module.exports = class Profiler
 		for k,v of @args
 			args[k] = v
 		args.updateTimes = @updateTimes
+		args.start = @start
+		args.end = new Date()
 		logger.log args, @name