Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: uxebu/prfl
base: 83ed6ca59a
...
head fork: uxebu/prfl
compare: e8eb4136d8
Checking mergeability… Don't worry, you can still create the pull request.
  • 2 commits
  • 1 file changed
  • 0 commit comments
  • 1 contributor
Showing with 7 additions and 1 deletion.
  1. +7 −1 src/prfl.js
View
8 src/prfl.js
@@ -72,10 +72,16 @@
}
}
+ var median, sorted = samples.slice().sort();
+ median = numCalls % 0 ?
+ sorted[(numCalls - 1) / 2] :
+ (sorted[numCalls / 2] + sorted[numCalls / 2 - 1]) / 2;
+
return {
average: sum / numCalls,
numCalls: numCalls,
max: max,
+ median: median,
min: min,
sum: sum
}
@@ -97,7 +103,7 @@
var profiler = this;
var getTime = this.getTime, totalTimesStack = this.totalTimesStack;
var wrapper = function wrapper() {
- var constructed, lastIndex, returnValue, start, time;
+ var lastIndex, returnValue, start, time;
// add level to total times stack for all nested functions
totalTimesStack.push(0);

No commit comments for this range

Something went wrong with that request. Please try again.