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

rendering-timer

v0.0.65

Published

Verify rendering speed of web site.

Readme

Rtimer

Provides tool for audit rendering performance.
It doesn't require any modification for target Web site.

Features

  • Measure the time required for screen transitions.
  • Enable audit CSR performance.
  • No need to modify target website.
  • Image-based determination of rendering completion.
  • Easily compare multiple website.
  • Puppeteer-based testing scenario.

ToC

Getting started

Execute following command.

npm install rendering-timer -D

Create example scenario file.

npx rtimer init

Run Rtimer. Then, you can see report on your console.

npx rtimer audit

resultCap

How to use it?

  1. Create scenario files.
  2. Create rtimer.config.json if you need.
  3. Run audit command to correct performance timeline files.
  4. Run analyze command to analyze performance from performance timeline files.

Scenario files

rendering-timer need scenario files to audit performance.

const { Scenario } = require('rendering-timer');

module.exports = new Scenario({
  name: 'exampleScenario',
  outDir: 'example/moreInfo',
  startUrl: 'https://example.com/',
  /*
  prepare: async (page) => {
    await page.type('#userIdInput', 'userId');
    await page.type('#passwordInput', 'password');
    await page.$('#loginButton').click();
  }
  */
  triger: async (page) => {
    const link = await page.$('a');
    if(!link) return console.error('link was not found')
    await link.click();
  } 
})
  • name is option to specify scenario. It is used to audit single scenario with --name option of CLI command.
  • outDir is option to specify path to output performance timeline json. In this example's case, output file will be stored in [PJroot]/timeline/example/moreInfo.
  • startUrl is start point of audit.
  • prepare is callback function (optional). This function will be called before triger callback. Usualy, it is useful for authentication.
  • triger is callback function. rendering-timer lunch puppeteer with startUrl then, call prepare callback and triger callback. After exit triger callback, rendering-timer start to collect performance timeline.

triger and prepare recieve page object of puppeteer. So, you can use puppeteer APIs.
See puppeteer docs.

CLI Usage

npx rtimer <command> [options]

audit command

Start performance audit with puppeteer, and create performance timiline files for each scenarios. You need to create scenario files to run this command.

  • --times is option for specify number of trials. Analyze result contains avarage of them.
  • --name is option to audit with single scenario file.

analyze command

Start analyze performance timeline files. You need to run audit command to create performance timeline files before running this command.

  • --output is option for specify output file type. ("csv" | "json")

run command

Run audit command then, run analyze command.
Options for audit and analyze can be specified.

init command

Create example scenario file.

help command

Show help text.