Skip to content

Conversation

@pedrosousa13
Copy link
Owner

@pedrosousa13 pedrosousa13 commented Jan 19, 2026

This pull request adds comprehensive benchmarking support to the project, enabling easy performance comparisons between lnpm and competing tools (such as yalc and relative-deps). It introduces new benchmark targets in the Makefile, a script for automated comparison, and a suite of Go benchmarks for core operations. The documentation is updated to include benchmark results and instructions. Additionally, new test helpers and fixtures are provided to facilitate testing of packages with custom scripts and lockfile scenarios.

Benchmarking and Comparison Features

  • Added new bench, bench-mem, and bench-compare targets to the Makefile for running Go benchmarks, memory allocation stats, and tool comparisons, respectively.
  • Introduced scripts/benchmark-compare.sh, a Bash script that automates benchmarking of lnpm, yalc, and relative-deps for publish/add/push operations, reporting average times for each.
  • Implemented a suite of Go benchmarks in tests/bench_test.go to measure performance of lnpm operations and compare against yalc and relative-deps.

Documentation Updates

  • Updated README.md with a new Benchmarks section, including performance tables, detailed results, and instructions for running benchmarks locally.
  • Enhanced Makefile help output to include descriptions of the new benchmark targets.

Test Infrastructure Improvements

  • Added helpers in tests/helpers_test.go for creating test packages with custom scripts, asserting presence/absence of scripts, and waiting for sync events, improving test coverage for script and watch functionality.
  • Added new test fixtures for packages with hooks and corrupted lockfiles to support more robust testing scenarios. [1] [2] [3]

(References: [1] [2] [3] [4] [5] [6] [7] [8]

@pedrosousa13 pedrosousa13 merged commit 90ec240 into main Jan 19, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant