vitest icon indicating copy to clipboard operation
vitest copied to clipboard

docs: add bench test case `TaskResult` type description

Open btea opened this issue 1 year ago • 5 comments

Description

Add TaskResult field information description in the documentation.

Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

  • [ ] It's really useful if your PR references an issue where it is discussed ahead of time. If the feature is substantial or introduces breaking changes without a discussion, PR might be closed.
  • [ ] Ideally, include a test that fails without this PR but passes with it.
  • [ ] Please, don't make changes to pnpm-lock.yaml unless you introduce a new test example.

Tests

  • [ ] Run the tests with pnpm test:ci.

Documentation

  • [ ] If you introduce new functionality, document it. You can run documentation with pnpm run docs command.

Changesets

  • [ ] Changes in changelog are generated from PR name. Please, make sure that it explains your changes in an understandable manner. Please, prefix changeset messages with feat:, fix:, perf:, docs:, or chore:.

btea avatar Oct 14 '24 15:10 btea

Deploy Preview for vitest-dev ready!

Built without sensitive environment variables

Name Link
Latest commit 2af6da84675d1740d4606069cd1135a53c77157d
Latest deploy log https://app.netlify.com/sites/vitest-dev/deploys/670e691f7e784a0007443f6a
Deploy Preview https://deploy-preview-6704--vitest-dev.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] avatar Oct 14 '24 15:10 netlify[bot]

It looks a bit noisy to show this for each re-run :thinking: Would it be fine if we mention that in the doc? https://vitest.dev/guide/features.html#benchmarking or https://vitest.dev/api/#bench

hi-ogawa avatar Oct 15 '24 00:10 hi-ogawa

Of course, it would be better to add this to the documentation. However, I think it might be more convenient and quicker to output this in the terminal so that it can be directly accessed.

Maybe we can add it on both sides. As for what you said, it will be a bit noisy when it is printed every time it is re-run. Maybe we can add a shortcut key to print this information when the corresponding key is pressed. What do you think?

btea avatar Oct 15 '24 01:10 btea

If we provide an API to run benchmarks, the API should be documented in https://vitest.dev

Ref: https://github.com/vitest-dev/vitest/issues/279

sheremet-va avatar Oct 15 '24 09:10 sheremet-va

Thanks for the link, I have updated the document.

btea avatar Oct 15 '24 13:10 btea