commit | b946b84d5992f6585447e4d64e6c231fa20a7467 | [log] [tgz] |
---|---|---|
author | Marc-Antoine Ruel <maruel@google.com> | Thu May 25 20:29:50 2023 +0000 |
committer | CQ Bot <fuchsia-internal-scoped@luci-project-accounts.iam.gserviceaccount.com> | Thu May 25 20:29:50 2023 +0000 |
tree | 25c98fd7667238936fe9572e4fc387382e4e2a4e | |
parent | d559295a709d6878205b6d09e797368747d7aa4b [diff] |
[engine] Reuse stdout buffer for git operations and exec Since parallel checks are always limited to NumCPU()+2, this limits the number of stdout buffers created. This reduce memory usage and fragmentation for exec(). Create three 16kib buffers to reduce initial fragmentation. This enables running git commands in parallel. For now, only git diff runs in parallel. Improvements all around for memory allocation, with significant delta: name old alloc/op new alloc/op delta CtxOsExec 137kB ± 0% 70kB ± 0% -49.01% (p=0.004 n=5+6) CtxOsExec100 9.07MB ± 0% 2.55MB ± 5% -71.85% (p=0.004 n=5+6 Change-Id: If9c92826db94d0bb2193827dfa8fb7d3f7830060 Reviewed-on: https://fuchsia-review.googlesource.com/c/shac-project/shac/+/859576 Reviewed-by: Oliver Newman <olivernewman@google.com> Commit-Queue: Marc-Antoine Ruel <maruel@google.com>
Shac (Scalable Hermetic Analysis and Checks) is a unified and ergonomic tool and framework for writing and running static analysis checks.
Shac checks are written in Starlark.
go install go.fuchsia.dev/shac-project/shac@latest shac check shac doc shac.star | less
⚠ The source of truth is at https://fuchsia.googlesource.com/shac-project/shac.git and uses Gerrit for code review.
See CONTRIBUTING.md to submit changes.