@himenon/ticktack
TypeScript icon, indicating that this package has built-in type declarations

0.1.2 • Public • Published

@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

scripts description
build typescript build and create proxy directory
clean clean up
format:code prettier
format:yarn:lock yarn.lock deduplicate
lerna:version:up lerna version up
test execute test:depcruise, test:jest
test:depcruise dependency-cruiser's test
test:jest jest test
ts execute ts-node
release:github:registry publish GitHub registry
release:npm:registry publish npm registry

Features

Release

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

LICENCE

@himenon/ticktack・MIT

Readme

Keywords

Package Sidebar

Install

npm i @himenon/ticktack

Weekly Downloads

1

Version

0.1.2

License

MIT

Unpacked Size

40.3 kB

Total Files

35

Last publish

Collaborators

  • himenoglyph