microsoft / scalar

Scalar: A set of tools and extensions for Git to allow very large monorepos to run on Git without a virtualization layer
MIT License
1.39k stars 63 forks source link

[WIP] Add stress tests #390

Closed derrickstolee closed 4 years ago

derrickstolee commented 4 years ago

Add a new category of functional test that does not run normally. These intend to check that commands like git status work well in parallel. There are three main situations covered here:

  1. One thread changes a single repo, while other threads run git status in a loop. This checks the in-repo parallelism. Only one writer is supported, so this many-to-one split is necessary.
  2. Multiple threads change multiple, independent repos. This verifies that the filesystem watcher works when bombarded with many independent requests. Watchman may struggle in this scenario, but the internal FSMonitor currently has a separate service process per repo.
  3. Multiple threads change multiple worktrees for the same repo. This is an important, but advanced case. The object database is being modified in parallel (additively) but the indexes should be independent.

These tests are disabled by default, but are the only tests run when providing the --stress option to the functional tests.

These are duplicated on the internal FSMonitor in #389.