broccoli-persistent-filter
Advanced tools
Comparing version 1.2.9 to 1.2.10
# master | ||
# 1.2.9 | ||
* improve logging, add some information at INFO level and not only DEBUG | ||
# 1.2.8 | ||
* reduce package size with explicit `files` in `package.json` | ||
# 1.2.7 | ||
@@ -4,0 +12,0 @@ |
16
index.js
@@ -84,2 +84,8 @@ 'use strict'; | ||
function timeSince(time) { | ||
var delta = process.hrtime(time); | ||
var deltaNS = delta[0] * 1e9 + delta[1]; | ||
return (deltaNS / 1e6).toFixed(2) +' ms'; | ||
} | ||
Filter.prototype.build = function() { | ||
@@ -89,2 +95,3 @@ var srcDir = this.inputPaths[0]; | ||
var prevTime = process.hrtime(); | ||
var instrumentation = heimdall.start('derivePatches', DerivePatchesSchema); | ||
@@ -103,6 +110,9 @@ | ||
this._logger.info('derivePatches', 'duration:', timeSince(prevTime), JSON.stringify(instrumentation.stats)); | ||
instrumentation.stop(); | ||
return heimdall.node('applyPatches', ApplyPatchesSchema, function(instrumentation) { | ||
return mapSeries(patches, function(patch) { | ||
var prevTime = process.hrtime(); | ||
var result = mapSeries(patches, function(patch) { | ||
var operation = patch[0]; | ||
@@ -137,2 +147,6 @@ var relativePath = patch[1]; | ||
}, this); | ||
this._logger.info('applyPatches', 'duration:', timeSince(prevTime), JSON.stringify(instrumentation)); | ||
return result; | ||
}, this); | ||
@@ -139,0 +153,0 @@ }; |
{ | ||
"name": "broccoli-persistent-filter", | ||
"version": "1.2.9", | ||
"version": "1.2.10", | ||
"description": "broccoli filter but with a persistent cache", | ||
@@ -5,0 +5,0 @@ "author": "Stefan Penner <stefan.penner@gmail.com>", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
23542
352