Skip to content

Commit

Permalink
Fix error in CPU profiler
Browse files Browse the repository at this point in the history
  • Loading branch information
baryshev committed Oct 4, 2012
1 parent 3021656 commit 396bf44
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 14 deletions.
12 changes: 0 additions & 12 deletions lib/look.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,4 @@ module.exports.start = function (port, host) {
});

nodetime.profile({ server: 'localhost', accountKey: 'session', silent: true, transactions: false });

var lastTick = Date.now();

var tickHandler = function () {
var now = Date.now();
nodetime.metric('Process', 'Event loop iteration time', now - lastTick, 'ms', 'avg');
lastTick = now;
process.nextTick(tickHandler);
};

process.nextTick(tickHandler);

};
2 changes: 1 addition & 1 deletion lib/web/js/look/look.cpu.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ var Look = (function () {
for (var i = 0; i < call._target.length; i++) {
var targetCall = call._target[i];
if (targetCall._cpuUsage > call._cpuUsage / 2 && targetCall._cpuUsage >= 1) {
path = that.getHostPath(targetCall).concat(path);
path = that.getHotPath(targetCall).concat(path);
break;
}
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "look",
"version": "0.1.1",
"version": "0.1.2",
"description": "Performance profiler based on nodetime",
"keywords": [
"profiler",
Expand Down

0 comments on commit 396bf44

Please sign in to comment.