-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1531e0e
commit de505ec
Showing
5 changed files
with
32 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const benchmark_1 = __importDefault(require("benchmark")); | ||
const dataschema_1 = __importDefault(require("./src/dataschema")); | ||
var suite = new benchmark_1.default.Suite; | ||
const schema = require("./tests/data/skychangeschema.json"); | ||
const data = Buffer.from(require("./tests/data/skychangeresult.json")); | ||
const obj = require("./tests/data/skychangeobj.json"); | ||
// add tests | ||
suite.add('parse', function () { | ||
dataschema_1.default.parse(schema, data, 0); | ||
}) | ||
.add('calculate', function () { | ||
dataschema_1.default.calculateDataLength(schema, obj); | ||
}) | ||
.add('pack', function () { | ||
dataschema_1.default.pack(schema, obj); | ||
}) | ||
// add listeners | ||
.on('cycle', function (event) { | ||
console.log(String(event.target)); | ||
}) | ||
// run async | ||
.run({ 'async': false }); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters