npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@trace-it/cli

v1.1.1

Published

CLI tool related to trace-it

Downloads

24

Readme

trace-it-cli

:clock1: CLI Tool for Trace-it :mag_right:

Release npm (scoped) NPM npm

This package provides some cli tools for the performance measuring tool trace-it.

INTALLATION

The cool thing with npx (and this tool) is: You do not have to install it! You can simply run it by calling npx @trace-it/cli <command> and npx will do the rest. If you want to install it (to use a specific version or similar) you can also install it:

# locally
npm install @trace-it/cli --save-dev

# or
# global
npm install @trace-it/cli --global

USAGE

You can print the whole USAGE instractions by calling npx @trace-it/cli --help. In general you can append --help after each command.

This cli tool provides two base commands: analyze and clear:

:chart_with_upwards_trend: Analyze

To call the analyzation features do the following:

npx @trace-it/cli analyze --help
USAGE: npx @trace-it/cli analyze <OPTIONS>

MANDATORY OPTIONS:
    --driver            The storage driver ('lowdb' or 'mongodb').
    --dbName            The database name (or filePath for lowdb).
    --dbUrl             The database url (not used for lowdb).
    --dbUser            The database user (not used for lowdb).
    --dbPassword        The database password (not used for lowdb).

    --precision         The precision of the measured values ('ns', 'ms' or 's').
                        Default: 'ms'.

    --output            Output format ('stdout' or 'html').           # HTML is coming soon.
    --outputFile        Output file name (used for html).

The stdout output does only print some basic information:

$ npx @trace-it/cli analyze --driver lowdb --dbName ./perf.json  --output stdout
semanticId           count    # children    max         min         avg         p50         p75         95          p99
root                 1        2             270.85ms    270.85ms    270.85ms    270.85ms    270.85ms    270.85ms    270.85ms
|- child1            10       0             17.14ms     14.82ms     15.59ms     15.42ms     15.76ms     16.75ms     17.06ms
|- child2            5        1             24.24ms     17.91ms     20.38ms     19.42ms     21.21ms     23.63ms     24.12ms
|  |- child2child    5        0             4.36ms      2.25ms      3.10ms      3.06ms      3.14ms      4.12ms      4.31ms

The html output will print more information like the separate transaction runs, the related transaction data, the hierarchy of the runs and similar.

:x: Clear

This feature will clear all measurement that are available in the storage.

npx @trace-it/cli clear --help
USAGE: trace-it clear <OPTIONS>

MANDATORY OPTIONS:
    --driver            The storage driver ('lowdb' or 'mongodb').
    --dbName            The database name (or filePath for lowdb).
    --dbUrl             The database url (not used for lowdb).
    --dbUser            The database user (not used for lowdb).
    --dbPassword        The database password (not used for lowdb).

Changelog

See changes for each version in the release notes.

License

MIT - Matthias Hecht