Clone and edit this document
Runkit
Runkit
home page
user forum
new notebook
clone notebook
download notebook
support & documentation
log in
sign up
new notebook
help & feedback
clone this notebook
download this notebook
Sign In
Sign Up
AWS Cron Parser - Benchmark
node v14.20.1
version:
1.0.5
endpoint
share
tweet
Benchmark the main methods of the aws-cron-parser npm library
const Benchmark = require("benchmark"); const awsCronParser = require("aws-cron-parser"); const title = "AWS Cron Parser - Benchmark"; new Benchmark.Suite() .add("aws-cron-parser-next", function () { awsCronParser.next(awsCronParser.parse("1 2 3 4 ? *"), new Date()); }) .add("aws-cron-parser-prev", function () { awsCronParser.prev(awsCronParser.parse("1 2 3 4 ? *"), new Date()); }) .on("cycle", function (event) { console.log(String(event.target)); }) .run({ async: true }); title;
Loading…
no comments
sign in
to comment