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 🙏

© 2025 – Pkg Stats / Ryan Hefner

bench-hexo

v0.2.1

Published

A benchmarking cli for Hexo.

Downloads

1,051

Readme

bench-hexo

A benchmarking cli for Hexo, modified from hexo#benchmark.js

Usage

Profiling

Use 0x to generate a flamegraph for the Hexo generation process.

Syntax

npx bench-hexo profiling [options]

Options

  • --max-old-space-size <number>: Set the maximum old space size for Node.js (default: 4096MB).
  • -c, --concurrency <number>: Set the number of concurrent processes (default: Infinity).
  • --no-clean: Do not clean Hexo cache before profiling.

Example

✔ Cleaning complete.
✔ Profiling complete. Flamegraph saved to 0x directory.
✔ Hexo statistics loaded.

Hexo Statistics:

Number of posts:              2000
Number of post assets:        0
Avg of post content length:   17330
Number of pages:              0
Number of page assets:        0
Avg of page content length:   0
Number of tags:               100
Number of categories:         13
Number of routes:             4243

Benchmark

Use perf_hooks to measure the performance metrics of the Hexo generation process.

Syntax

npx bench-hexo benchmark [options]

Options

  • --max-old-space-size <number>: Set the maximum old space size for Node.js (default: 4096MB).
  • -c, --concurrency <number>: Set the number of concurrent processes (default: Infinity).

Example

✔ Cleaning complete.
Cold processing
┌──────────────────────────────┬───────────────┐
│ (index)                      │ Cost time (s) │
├──────────────────────────────┼───────────────┤
│ Load Plugin/Scripts/Database │ '0.20s'       │
│ Process Source               │ '2.85s'       │
│ Render Posts                 │ '2.99s'       │
│ Render Files                 │ '7.10s'       │
│ Save Database                │ '0.64s'       │
│ Total time                   │ '13.77s'      │
└──────────────────────────────┴───────────────┘
Hot processing
┌──────────────────────────────┬───────────────┐
│ (index)                      │ Cost time (s) │
├──────────────────────────────┼───────────────┤
│ Load Plugin/Scripts/Database │ '1.17s'       │
│ Process Source               │ '1.17s'       │
│ Render Files                 │ '6.08s'       │
│ Save Database                │ '0.64s'       │
│ Total time                   │ '9.06s'       │
└──────────────────────────────┴───────────────┘
✔ Cleaning complete.
Another Cold processing
┌──────────────────────────────┬───────────────┐
│ (index)                      │ Cost time (s) │
├──────────────────────────────┼───────────────┤
│ Load Plugin/Scripts/Database │ '0.20s'       │
│ Process Source               │ '2.86s'       │
│ Render Posts                 │ '2.95s'       │
│ Render Files                 │ '7.08s'       │
│ Save Database                │ '0.64s'       │
│ Total time                   │ '13.73s'      │
└──────────────────────────────┴───────────────┘
✔ Hexo statistics loaded.

Hexo Statistics:

Number of posts:              2000
Number of post assets:        0
Avg of post content length:   17330
Number of pages:              0
Number of page assets:        0
Avg of page content length:   0
Number of tags:               100
Number of categories:         13
Number of routes:             4243

Memory

Use megumu to measure the memory usage of the Hexo generation process.

Syntax

node src/index.js memory [options]

Options

  • -s, --sample-rate <number>: Sample rate in milliseconds (default: 500ms).
  • --max-old-space-size <number>: Set the maximum old space size for Node.js (default: 4096MB).
  • -c, --concurrency <number>: Set the number of concurrent processes (default: Infinity).
  • --no-clean: Do not clean Hexo cache before profiling.

Example

✔ Cleaning complete.
✔ Memory profiling complete.
    1196.86┤              ╭╮
    1117.26┤              ││
    1037.66┤              ││
     958.06┤              ││       ╭
     878.46┤              ││      ╭╯
     798.86┤              ││     ╭╯
     719.27┤             ╭╯│     │
     639.67┤             │ ╰─────╯
     560.07┤         ╭╮  │
     480.47┤         │╰──╯
     400.87┼╮      ╭─╯
     321.27┤│   ╭╮╭╯
     241.68┤│ ╭─╯╰╯
     162.08┤╰─╯


RSS Memory Stats:

Avg:          523.54MB
Min:          162.08MB
Max:          1196.86MB
Midian:       483.52MB
Total Time:   12.866s
✔ Hexo statistics loaded.

Hexo Statistics:

Number of posts:              2000
Number of post assets:        0
Avg of post content length:   17330
Number of pages:              0
Number of page assets:        0
Avg of page content length:   0
Number of tags:               100
Number of categories:         13
Number of routes:             4243

License

MIT