Skip to content
This repository has been archived by the owner on Jan 4, 2021. It is now read-only.

Commit

Permalink
fix: perf timers
Browse files Browse the repository at this point in the history
  • Loading branch information
aleclarson committed Jul 22, 2018
1 parent af9b7a1 commit 435c886
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Bundle/build.coffee
Expand Up @@ -86,10 +86,14 @@ build = (bundle, state) ->
each bundle.packages, (versions, name) ->
versions.forEach dropUnusedPackage

concatTimer = elaps 'concatenated %O assets in %t', assets.length

# Concatenate the assets.
t3 = elaps 'concatenate assets'
result = await bundle._concat assets, packages
t3.stop()

if /\bcush\b/.test process.env.DEBUG
setImmediate -> concatTimer.stop true

return result

module.exports = build
Expand Down
2 changes: 2 additions & 0 deletions src/workers/Bundle.coffee
Expand Up @@ -12,6 +12,8 @@ vm = require 'vm'
empty = []
VERBOSE = process.env.VERBOSE is '1'

elaps.log = log

class Bundle
constructor: (props) ->
@id = props.id
Expand Down

0 comments on commit 435c886

Please sign in to comment.