String "enormous", "large" "medium" or "small",
default is "medium"; optional; nonconfigurable
Specifies a test target's "heaviness": how much time/resources it needs to run.
Unit tests are considered "small", integration tests "medium", and end-to-end tests "large" or
"enormous". Bazel uses the size to determine a default timeout, which can be overridden using the
timeout
attribute. The timeout is for all tests in the BUILD target, not for each
individual test. When the test is run locally, the size
is additionally used for
scheduling purposes: Bazel tries to respect --local_{ram,cpu}_resources
and not
overwhelm the local machine by running lots of heavy tests at the same time.
Test sizes correspond to the following default timeouts and assumed peak local resource usages:
Size | RAM (in MB) | CPU (in CPU cores) | Default timeout |
---|---|---|---|
small | 20 | 1 | short (1 minute) |
medium | 100 | 1 | moderate (5 minutes) |
large | 300 | 1 | long (15 minutes) |
enormous | 800 | 1 | eternal (60 minutes) |
The environment variable
TEST_SIZE
will be set to the
value of this attribute when spawning the test.