perfrunner-core
TypeScript icon, indicating that this package has built-in type declarations

0.13.0-alpha.1 • Public • Published

Perfrunner-core Build Status npm

This package was written to simplify performance testing for the web application. It supports:

  • Network conditions - downloadThroughput, uploadThroughput, latency
  • CPU throttling
  • Browser caching and no caching
  • Multiple runs against the same URL for better precision
  • Chrome arguments
  • Storing data between test runs
  • Tracing in Chrome readable format for better investigation

Installation

npm i perfrunner-core -D

Usage example

import { profile } from 'perfrunner-core';

(async function () {
    const profilingResult = await profile({
        url: 'https://drag13.io',
        network: { downloadThroughput: 1000, uploadThroughput: 500, latency: 200 },
        output: './generated',
        runs: 5,
        throttlingRate: 4,
        timeout: 90000,
    });

    console.log(JSON.stringify(profilingResult));
});

Tracing

After testing, you can find traces in Chrome readable format inside the folder related to the test run. This might be helpful for additional investigation

Tests

npm test

Package Sidebar

Install

npm i perfrunner-core

Weekly Downloads

3

Version

0.13.0-alpha.1

License

MIT

Unpacked Size

57.1 kB

Total Files

58

Last publish

Collaborators

  • drag13