0.1.2 • Published 3 years ago

@himenon/ticktack v0.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

@himenon/ticktack

Tool to measure execution time of CLI and JavaScript. It supports both the browser and NodeJS environments.

Install

yarn global add @himenon/ticktack

CLI

export TICKTACK_OUTPUT_PATH="performance.json"
export TICKTACK_NAME="my"

// Use environment settings
ticktack -c "sleep 2"

// Use argument settings
ticktack -n "sleepCommand" -o "ticktack.json" -c "sleep 5"

Show current settings

$ ticktack -n "sleepCommand" -o "ticktack.json" -c "sleep 5" --show-log info,command  --show-settings
output file path : ticktack.json
name             : sleepCommand
command          : sleep 5
Show message type: info, command

API

import * as Ticktack from "@himenon/ticktack";

const wait = async ms => new Promise(resolve => setTimeout(resolve, ms));
const perfWait = Ticktack.wrapAsync(wait, { name: "wait", label: "timer" });
await Promise.all([perfWait(1000), perfWait(500), perfWait(1200), perfWait(1300)]);
await Ticktack.getResult();

Development

scriptsdescription
buildtypescript build and create proxy directory
cleanclean up
format:codeprettier
format:yarn:lockyarn.lock deduplicate
lerna:version:uplerna version up
testexecute test:depcruise, test:jest
test:depcruisedependency-cruiser's test
test:jestjest test
tsexecute ts-node
release:github:registrypublish GitHub registry
release:npm:registrypublish npm registry

Features

Release

  • Automatic version updates are performed when merged into the default branch.

LICENCE

@himenon/ticktack・MIT

0.1.2

3 years ago

0.1.1

4 years ago

0.1.0

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago