Launch Week Day 5: Introducing Reachability for PHP.Learn More
Socket
Book a DemoSign in
Socket

baseline

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

baseline - npm Package Compare versions

Comparing version
0.1.7
to
0.1.8
+0
-4
lib/baseline.d.ts

@@ -18,6 +18,2 @@ interface Callback {

skip(title: string, action: (done?: Callback) => void): void;
loop: {
(title: string, action?: (count: number, done?: Callback) => void): void;
skip(title: string, action: (count: number, done?: Callback) => void): void;
}
}

@@ -24,0 +20,0 @@

+8
-18

@@ -9,3 +9,2 @@ /// <reference path="./types.d.ts" />

var Test = require("./test");
var ManualTest = require("./manualTest");
var Evaluator = require("./evaluator");

@@ -70,2 +69,3 @@ var NodeTimer = require("./nodeTimer");

Baseline.prototype._createGlobals = function (context) {
var _this = this;
var suites = [this._suite];

@@ -96,13 +96,12 @@ context.suite = function (title, block) {

context.test = function (title, action) {
return addTest(new Test(title, action));
var test = new Test(title, action);
suites[0].addTest(test);
test.timeout = _this.timeout;
return test;
};
context.test.skip = function (title, action) {
return skipTest(context.test(title, action));
var test = global.test(title, action);
test.pending = true;
return test;
};
context.test.loop = function (title, action) {
return addTest(new ManualTest(title, action));
};
context.test.loop.skip = function (title, action) {
return skipTest(context.test.loop(title, action));
};
context.after = function (action) {

@@ -120,11 +119,2 @@ suites[0].addAfter(action);

};
function addTest(test) {
suites[0].addTest(test);
test.timeout = this.timeout;
return test;
}
function skipTest(test) {
test.pending = true;
return test;
}
};

@@ -131,0 +121,0 @@ Baseline.DefaultReporter = DefaultReporter;

@@ -28,5 +28,2 @@ /// <reference path="./types.d.ts" />

ret._results = JSON.parse(data);
if (ret._results.type === undefined) {
ret._results.type = "hz";
}
callback(null, ret);

@@ -45,5 +42,5 @@ });

Results.prototype.getBaselineHz = function (test) {
return this._findValue(this._getPath(test));
return this._findHz(this._getPath(test));
};
Results.prototype._findValue = function (path) {
Results.prototype._findHz = function (path) {
var results = this._results;

@@ -70,5 +67,3 @@ for (var i = 0, l = path.length - 1; i < l; i++) {

Results._getSuiteResults = function (suite) {
var results = {
type: "sample"
};
var results = {};
if (suite.tests.length > 0) {

@@ -75,0 +70,0 @@ results.tests = {};

@@ -9,3 +9,3 @@ /// <reference path="./types.d.ts" />

if (action) {
this.async = action.length > 0;
this.async = !!action.length;
}

@@ -12,0 +12,0 @@ }

@@ -71,3 +71,3 @@ /*!

}
// Reject the null hypothesis the two samples come from the
// Reject the null hyphothesis the two samples come from the
// same population (i.e. have the same median) if...

@@ -74,0 +74,0 @@ if (size1 + size2 > 30) {

{
"name": "baseline",
"description": "A benchmarking library that allows performance to be compared to an established baseline.",
"version": "0.1.7",
"version": "0.1.8",
"author": {

@@ -6,0 +6,0 @@ "name": "Artifact Health, LLC",

var __extends = this.__extends || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;
d.prototype = new __();
};
var Test = require("./test");
var ManualTest = (function (_super) {
__extends(ManualTest, _super);
function ManualTest(title, action) {
_super.call(this, title, action);
this.title = title;
this.async = action.length > 1;
}
ManualTest.prototype.invoke = function (callback) {
var _this = this;
// execute an async test
if (this.async) {
// test has indicated that it wants to handle the test loop
var start = this.timer.start();
this.action(this.count, function (err) {
_this.clocked = _this.timer.stop(start);
callback(err);
});
return;
}
// test has indicated that it wants to handle the test loop
var start = this.timer.start();
this.action(this.count);
this.clocked = this.timer.stop(start);
callback();
};
return ManualTest;
})(Test);
module.exports = ManualTest;
//# sourceMappingURL=manualTest.js.map
{
"suites": {
"Sorting Algorithms": {
"tests": {
"Insertion Sort": [
0.0000013449807145539402,
0.0000013562949680811117,
0.0000014229387908374014,
0.0000013297182090022034,
0.0000013542127006610008,
0.000001356514951211835,
0.000001324890725002623,
0.0000013141375773790789,
0.0000013412561378659112,
0.0000013219311719651662,
0.0000014136705487357045,
0.000001325912286223901,
0.0000013631753488616096,
0.0000013549769436575384,
0.0000013467747613052146,
0.000001354785856678208,
0.0000013633756951001993,
0.000001343119032630364,
0.000001354939854160109,
0.0000013176503777148253,
0.0000013472785646836638,
0.000001328541994544119,
0.0000013308041128947644,
0.0000013131266393872626,
0.0000013423696359248767,
0.0000013163267148485404,
0.0000013186205025178071,
0.0000013445722336733897,
0.0000013271467633782973,
0.0000013446799123333422,
0.0000013232427531505206,
0.0000013331014950296136,
0.000001321187283116341,
0.0000013216455240431027,
0.0000014113463615727815,
0.0000014475373235578052,
0.0000013963866986719545,
0.0000013150434680512432,
0.0000013784119811099226,
0.0000014220767344169907,
0.000001315157173793931,
0.0000014372797505674852,
0.0000013409127768935737,
0.0000013290440942416572,
0.0000013334719127508022,
0.0000013198835285829832,
0.0000013454535184073892,
0.0000013357708664909854,
0.0000013485048138388081,
0.000001336730164114071,
0.0000013365001956845043,
0.0000013439131943538497,
0.0000013415414981605656,
0.0000013233564588932084,
0.0000013201284212174185,
0.0000013395412894304276,
0.0000013257086910011218,
0.0000013232839512615128,
0.0000013257760586531688,
0.000001342699611240118,
0.0000013298653429697081,
0.000001331793931171237,
0.0000013242336733895166,
0.0000013442927701098443,
0.0000013583262452057297,
0.000001328899392073473,
0.0000013274951078873902,
0.0000013315497430010175,
0.0000013281259425470295,
0.0000013348268322592427,
0.0000013313780363712266,
0.0000013262658700133067
]
}
}
},
"timestamp": 1425088072459
}