You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: guide/improving-performance.md
+7-7
Original file line number
Diff line number
Diff line change
@@ -88,17 +88,17 @@ export default defineConfig({
88
88
89
89
## Sharding
90
90
91
-
Test sharding means running a small subset of test cases at a time. It can be useful when you have multiple machines that could be used to run tests simultaneously.
91
+
测试分片意味着一次运行一小部分测试用例。当你有多台可用于同时运行测试的机器时,它会很有用。
92
92
93
-
To split Vitest tests on multiple different runs, use [`--shard`](/guide/cli#shard)option with [`--reporter=blob`](/guide/reporters#blob-reporter)option:
Test sharding can also become useful on high CPU-count machines.
180
+
测试分片在多 CPU 数量的机器上也很有用。
181
181
182
-
Vitest will run only a single Vite server in its main thread. Rest of the threads are used to run test files.
183
-
In a high CPU-count machine the main thread can become a bottleneck as it cannot handle all the requests coming from the threads. For example in 32 CPU machine the main thread is responsible to handle load coming from 31 test threads.
182
+
Vitest 将只在其主线程中运行一个 Vite 服务器。其余的线程用于运行测试文件。
183
+
在高 CPU 计数的机器中,主线程可能会成为瓶颈,因为它无法处理来自线程的所有请求。例如,在 32 CPU 机器中,主线程负责处理来自 31 个测试线程的负载。
184
184
185
-
To reduce the load from main thread's Vite server you can use test sharding. The load can be balanced on multiple Vite server.
185
+
为了减少主线程的 Vite 服务器的负载,可以使用测试分片。负载可以在多个 Vite 服务器上进行平衡。
186
186
187
187
```sh
188
188
# Example for splitting tests on 32 CPU to 4 shards.
Copy file name to clipboardExpand all lines: guide/using-plugins.md
+2-6
Original file line number
Diff line number
Diff line change
@@ -4,10 +4,6 @@ title: 使用插件 | 指南
4
4
5
5
# 使用插件
6
6
7
-
<<<<<<< HEAD
8
-
Vitest 可以使用插件进行扩展...
9
-
=======
10
-
Vitest can be extended using plugins, similar to how Vite plugins work. This allows you to enhance and customize Vitest's functionality by using the same API and concepts of Vite plugins.
7
+
Vitest 可以使用插件进行扩展,类似于 Vite 插件的工作方式。这允许你使用相同的 API 和 Vite 插件概念来增强和自定义 Vitest 的功能。
11
8
12
-
For detailed guidance on how to write plugins, you can refer to the [Vite plugin documentation](https://vitejs.dev/guide/api-plugin).
0 commit comments