New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

bench-node

Package Overview
Dependencies
Maintainers
0
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bench-node - npm Package Compare versions

Comparing version 0.2.1 to 0.3.0

test/plugin-api-doc.js

2

doc/Plugins.md

@@ -10,2 +10,4 @@ # Plugins

To observe how a plugin is used, see the `plugin-api-doc.js` file in tests and explore its results.
## Structure

@@ -12,0 +14,0 @@

2

lib/clock.js

@@ -227,3 +227,3 @@ const { debug, types } = require('node:util');

if (typeof p.onCompleteBenchmark === 'function') {
p.onCompleteBenchmark(result);
p.onCompleteBenchmark(result, bench);
}

@@ -230,0 +230,0 @@ }

@@ -14,3 +14,3 @@ const { clockBenchmark, debugBench, MIN_RESOLUTION, timer } = require('./clock');

function parsePluginsResult(plugins) {
function parsePluginsResult(plugins, name) {
const result = []

@@ -20,4 +20,4 @@ for (const p of plugins) {

name: p.toString(),
result: p.getResult?.() ?? 'enabled',
report: p.getReport?.() ?? '',
result: p.getResult?.(name) ?? 'enabled',
report: p.getReport?.(name) ?? '',
});

@@ -102,3 +102,3 @@ }

name: bench.name,
plugins: parsePluginsResult(bench.plugins),
plugins: parsePluginsResult(bench.plugins, bench.name),
};

@@ -105,0 +105,0 @@ }

{
"name": "bench-node",
"version": "0.2.1",
"version": "0.3.0",
"description": "",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -38,2 +38,9 @@ # `bench-node`

The [`bench-node-cli`](https://github.com/RafaelGSS/bench-node-cli) tool allows you to execute a `bench-node` benchmark
from any location, eliminating the need to install the `bench-node` package locally.
Simply use the following command to run your benchmark:
```bash
npx bench-node-cli my-benchmark.js
```
See the [examples folder](./examples/) for more common usage examples.

@@ -40,0 +47,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc