README: fix spelling/style

This commit is contained in:
Jörg Thalheim 2022-01-08 10:58:47 +01:00
parent dfe69db146
commit be77b8ea17

View file

@ -1,19 +1,20 @@
# nix-eval-jobs # nix-eval-jobs
This project evaluates nix attributes sets in parallel with a streamable json output. This project evaluates nix attributes sets in parallel with streamable json
This is useful for time and memory-intensive evaluations such as nixos machines i.e. in a CI context. output. This is useful for time and memory intensive evaluations such as NixOS
Evaluation happens with a controlable number of threads that are restarted if machines, i.e. in a CI context. The evaluation is done with a controllable
their memory consumption grows beyond a threshold. number of threads that are restarted when their memory consumption exceeds a
certain threshold.
For ease of integration nix-eval-jobs creates garbage collection roots for each To facilitate integration, nix-eval-jobs creates garbage collection roots for
evaluated derivation (drv file not the build) inside the supplied attribute. each evaluated derivation (drv file, not the build) within the provided
This prevent race conditions between nix garbage collection service and nix attribute. This prevents race conditions between the nix garbage collection
builds processes started by the user. service and user-started nix builds processes.
## Why using nix-eval-jobs? ## Why using nix-eval-jobs?
- Faster evaluation due the use of threads - Faster evaluation by using threads
- Memory used for evaluation is reclaimed after nix-eval-jobs is finished so that the build can use it. - Memory used for evaluation is reclaimed after nix-eval-jobs finish, so that the build can use it.
- Evaluation of jobs can fail individually - Evaluation of jobs can fail individually
## Example ## Example
@ -35,7 +36,7 @@ $ nix-eval-jobs --gc-roots-dir $(pwd)/gcroot --flake 'github:NixOS/patchelf#hydr
``` ```
The output here newline-seperated json according to https://jsonlines.org/ The output here is newline-seperated json according to https://jsonlines.org.
The code is derived from [hydra's](https://github.com/nixos/hydra) eval-jobs executable. The code is derived from [hydra's](https://github.com/nixos/hydra) eval-jobs executable.
@ -67,8 +68,14 @@ USAGE: nix-eval-jobs [options] expr
## Potential use-cases for the tool ## Potential use-cases for the tool
**Faster evaluator in deployment tools.** When evaluating nixos machines evaluation can take several minutes when performed on a single core. **Faster evaluator in deployment tools.** When evaluating NixOS machines,
This limits the scalability for large deployment with deployment tools such as [NixOps](https://github.com/NixOS/nixops). evaluation can take several minutes when run on a single core. This limits
**Faster evaluator in CI.** In addition to evaluation speed for CIs it is also useful if evaluation of individual jobs can fail in CIs in contrast to failing the whole jobset. scalability for large deployments with deployment tools such as
Furthermore for CIs that allow to create dynamic build steps, one can leverage the fact that nix-eval-jobs outputs derivation path seperatly. [NixOps](https://github.com/NixOS/nixops).
This allows to have seperate logs and success status per job rather than one big log file.
**Faster evaluator in CIs.** In addition to evaluation speed for CIs, it is also
useful if evaluation of individual jobs in CIs can fail, as opposed to failing
the entire jobset. For CIs that allow dynamic build steps to be created, one
can also take advantage of the fact that nix-eval-jobs outputs the derivation
path separately. This allows separate logs and success status per job instead
of a single large log file.