@dwtechs/winstan-plugin-express-perf
v0.2.1
Published
Open source Express performance measurement plugin for Winstan library.
Maintainers
Readme
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.
- 📦 Only 1 dependency for logging
- 🪶 Very lightweight
- 🧪 Thoroughly tested
- 💻 Works in Javascript and Typescript
- 🌳 Tree-shaking friendly with named exports
- 📝 Written in Typescript
Installation
$ npm i @dwtechs/winstan-plugin-express-perfUsage
import express from "express";
import { startTimer, endTimer } 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(startTimer);
app.use("/", route);
// Performance measurement ends
app.use(endTimer);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.
Support
| Environment | Version | | :---------- | :-----: | | Node.js | >= 22 |
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
| Purpose | Choice | Motivation | | :-------------- | :------------------------------------------: | -------------------------------------------------------------: | | repository | Github | hosting for software development version control using Git | | package manager | npm | default node.js package manager | | language | TypeScript | static type checking along with the latest ECMAScript features | | module bundler | Rollup | advanced module bundler for ES2022 modules | | unit testing | Jest | delightful testing with a focus on simplicity |
