mirror of
https://github.com/overleaf/overleaf.git
synced 2025-02-25 00:31:36 +00:00
log profilers start and end times for reference
This commit is contained in:
parent
e11f64f83a
commit
e00f4dde8e
1 changed files with 3 additions and 0 deletions
|
@ -9,6 +9,7 @@ module.exports = class Profiler
|
||||||
|
|
||||||
constructor: (@name, @args) ->
|
constructor: (@name, @args) ->
|
||||||
@t0 = @t = process.hrtime()
|
@t0 = @t = process.hrtime()
|
||||||
|
@start = new Date()
|
||||||
@updateTimes = []
|
@updateTimes = []
|
||||||
|
|
||||||
log: (label) ->
|
log: (label) ->
|
||||||
|
@ -25,4 +26,6 @@ module.exports = class Profiler
|
||||||
for k,v of @args
|
for k,v of @args
|
||||||
args[k] = v
|
args[k] = v
|
||||||
args.updateTimes = @updateTimes
|
args.updateTimes = @updateTimes
|
||||||
|
args.start = @start
|
||||||
|
args.end = new Date()
|
||||||
logger.log args, @name
|
logger.log args, @name
|
||||||
|
|
Loading…
Reference in a new issue