0.1.1 • Published 7 months ago

@dwtechs/winstan-plugin-express-perf v0.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

License: MIT npm version last version release date minified size

Synopsis

Winstan-plugin-express-perf.js is an open source Express performance measurement plugin for Winstan library.

This plugin will log the time it took to process a request.

  • no dependency
  • Very lightweight
  • Thoroughly tested
  • Works in Javascript and Typescript
  • Can be used as EcmaScrypt module
  • Written in Typescript

Support

  • node: 22

This is the oldest targeted versions. The library should work properly on older versions of Node.js but we do not support it officially.

Installation

$ npm i @dwtechs/winstan-plugin-express-perf

Usage

ES6 / TypeScript

import express from "express";
import perf from '@dwtechs/winstan-plugin-express-perf';

const app = express();
app.use(express.json());
// performance measurement starts for any call to the following routes
app.use(perf.start);
app.use("/", route);
// Performance measurement ends
app.use(perf.end);

Note that the plugin is standalone as it installs Winstan as a dependency. Of course you will usually need Winstan to log other things in you application.

Contributors

Winstan-plugin-express-perf.js is still in development and we would be glad to get all the help you can provide. To contribute please read contributor.md for detailed installation guide.

Stack

PurposeChoiceMotivation
repositoryGithubhosting for software development version control using Git
package managernpmdefault node.js package manager
languageTypeScriptstatic type checking along with the latest ECMAScript features
module bundlerRollupadvanced module bundler for ES6 modules
unit testingJestdelightful testing with a focus on simplicity
0.1.1

7 months ago

0.1.0

10 months ago