Conversation
- integrate benchmarking in CI workflow - create benchmark files for string and array helpers - update documentation for benchmarking commands
There was a problem hiding this comment.
Pull request overview
This PR introduces Vitest Bench benchmarking support to the project and CI, adds benchmark suites for a range of helpers, and updates docs/scripts to run benchmarks locally and in PR validation.
Changes:
- Add
pnpm bench/pnpm bench:watchscripts and wire benchmark file discovery into Vitest config. - Add a non-blocking “bench” job to PR validation via a reusable GitHub Actions workflow that runs benchmarks and reports results.
- Add new
*.bench.tsfiles across URL/string/array/object/function helpers and remove theradashidependency previously used by some benches.
Reviewed changes
Copilot reviewed 28 out of 29 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| vitest.config.ts | Adds benchmark include pattern to Vitest configuration. |
| pnpm-lock.yaml | Removes radashi from the lockfile. |
| package.json | Adds benchmark scripts; removes radashi dependency. |
| helpers/url/withoutTrailingSlash.bench.ts | Switches benchmark to use local helper + Vitest bench APIs. |
| helpers/url/withoutLeadingSlash.bench.ts | Switches benchmark to use local helper + Vitest bench APIs. |
| helpers/url/withTrailingSlash.bench.ts | Switches benchmark to use local helper + Vitest bench APIs. |
| helpers/url/withLeadingSlash.bench.ts | Switches benchmark to use local helper + Vitest bench APIs. |
| helpers/url/relativeURLToAbsolute.bench.ts | Adds benchmark coverage for relative→absolute URL helper. |
| helpers/url/onlyPath.bench.ts | Switches benchmark to use local helper + Vitest bench APIs. |
| helpers/url/extractPureURI.bench.ts | Adds benchmark coverage for URI extraction helper. |
| helpers/url/cleanPath.bench.ts | Switches benchmark to use local helper + Vitest bench APIs. |
| helpers/string/titleCase.bench.ts | Adds benchmark coverage for title casing helper. |
| helpers/string/snakeCase.bench.ts | Adds benchmark coverage for snake_case helper. |
| helpers/string/slugify.bench.ts | Adds benchmark coverage for slugify helper. |
| helpers/string/pascalCase.bench.ts | Adds benchmark coverage for PascalCase helper. |
| helpers/string/kebabCase.bench.ts | Adds benchmark coverage for kebab-case helper. |
| helpers/string/camelCase.bench.ts | Adds benchmark coverage for camelCase helper. |
| helpers/object/deepMerge.bench.ts | Adds benchmark coverage for deep merge helper. |
| helpers/object/deepCompare.bench.ts | Adds benchmark coverage for deep compare helper. |
| helpers/object/deepClone.bench.ts | Adds benchmark coverage for deep clone helper. |
| helpers/function/memoize.bench.ts | Adds benchmark coverage for memoize helper. |
| helpers/array/unique.bench.ts | Adds benchmark coverage for unique helper. |
| helpers/array/sort.bench.ts | Adds benchmark coverage for sort helper functions. |
| helpers/array/intersection.bench.ts | Adds benchmark coverage for intersection helper. |
| helpers/array/difference.bench.ts | Adds benchmark coverage for difference helper. |
| helpers/array/deepEquals.bench.ts | Adds benchmark coverage for deep array equality helper. |
| AGENTS.md | Documents benchmark commands and non-blocking intent. |
| .github/workflows/pr-validation.yml | Adds bench job and PR comment section reporting benchmark status. |
| .github/workflows/job-bench.yml | New reusable workflow that runs benchmarks and extracts summary outputs. |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…xtraction - change summary description to reflect benchmarked suites - ensure total suites extraction handles errors gracefully
- delete isNotNullish function and its tests - update returnOrThrowError to use isNullish - add isTruthy function and its examples/tests
- add isIterable to check for iterable objects - add isMap to check for Map instances - add isNegativeNumber to check for negative numbers - add isNonEmptyArray to check for non-empty arrays - add isNonEmptyString to check for non-empty strings - add isNull to check for null values - add isNumber to check for valid numbers - add isPlainObject to check for plain objects - add isPositiveNumber to check for positive numbers - add isPrimitive to check for primitive types - add isPromise to check for promise-like objects - add isRegExp to check for RegExp instances - add isString to check for string values - add isSymbol to check for symbol values - add isTimestamp to check for valid timestamps - add isUndefined to check for undefined values - add isValidDate to check for valid Date instances - add isValidRegex to check for valid regex patterns - add tests for all new helpers
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 124 out of 125 changed files in this pull request and generated 2 comments.
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Please include a summary of what this PR does and why it's needed.
Type of Change
Related Issues
Closes #(issue number)
How Has This Been Tested?
Describe the tests you ran and how to reproduce them:
Checklist
Screenshots (if applicable)
Add screenshots for UI changes.
Additional Context
Add any other context about the PR here.