Add presets and a unified settings registry with real memory and CPU ceilings
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 30/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- go
- Ambito
- cli, performance
Direzione di ricerca
Start by reading the existing CLI settings and resource-bound implementations named in the issue, including pkg/scanner/git.go, pkg/scanner/scanner.go, pkg/formats/types.go, pkg/projects/collect.go, pkg/registries/types.go, pkg/environments/types.go, pkg/scanner/structure.go, and pkg/discovery/discovery.go. Trace how current flags and bounds reach scanning, then review issues #1, #2, #29, #74, and #75. Done means the registry, presets, ceilings, provenance, reports, and listed acceptance tests are covered.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Why
The goal is excellent defaults, plus deep, documented control over how dircue trades speed against memory and I/O. That is FFmpeg's philosophy:
-presetand-tunebundle many knobs;-x264-params k=vreaches any knob;-h fulllists every option;-threads,-probesizeand-analyzedurationexpose the resource trade-offs.
Today dircue exposes 11 resource-related user controls: --workers, --max-file-bytes, --tree-size, --metrics-max-file-bytes, --structural-max-file-bytes, --structural-timeout, GOMEMLIMIT, and a few others. About 20 internal bounds that materially affect speed and memory can't be changed, and aren't reported:
| Bound | Value | Location |
|---|---|---|
| go-git object cache | 96 MiB LRU | third_party/go-git/plumbing/cache/common.go:14 |
| Pack descriptor cap | 8 | pkg/scanner/git.go:45 |
| Classification prefix | 128 KiB | pkg/scanner/scanner.go:36 |
| Formats | 64 KiB per file, 32 MiB total, 4,096 files | pkg/formats/types.go |
| Manifest size | 1 MiB | pkg/projects/collect.go:10 |
| Registries files | 256 KiB | pkg/registries/types.go |
| Environments budgets | various | pkg/environments/types.go |
| Function report limit | 1,024 | pkg/scanner/structure.go:201 |
| Discovery evidence per kind | 256 | pkg/discovery/discovery.go:15 |
There are no presets and no enforced memory ceiling, and a report doesn't say which settings produced it. Separately, --max-file-bytes saves memory by dropping coverage, rather than by changing strategy.
Proposal
- One typed settings registry as the single source for flags,
--set, settings files, docs and provenance. Each entry has a name, unit, default, range, description and a category:performance-only: must never change output;coverage-affecting: changes what is analyzed, and is reported as such;conformance-locked: e.g. Linguist's classification windows; changing one marks the output non-conformant.
- Presets via
--preset:balanced: today's defaults;fast: more workers, larger caches;low-memory: fewer workers, small caches, streaming reads, a tight in-flight byte budget;thorough: raises the coverage budgets (formats, functions, metrics sizes) and declares itself coverage-affecting.
- Fine-grained overrides:
--set key=value(repeatable) and--settings-filefrom the caller. Repository content can never supply settings. capabilities --settings [--json]lists every setting with its default, range, category and the preset values, likeffmpeg -h full.- Real resource ceilings, which supersede and advance #1 and #2:
--memory-limitsetsGOMEMLIMIT, bounds in-flight content bytes (backpressure), and scales caches and worker counts;--cpu-limitderivesGOMAXPROCSand worker scaling.- Each is documented honestly as cooperative or enforced (cgroup where available), and validated in cgroup-limited runs.
- Provenance. Reports record the effective settings and their origin, and flag any coverage-affecting or conformance-locked deviations (#74, #29).
Acceptance
- Registry plus presets plus
--set, with every internal bound listed above either exposed or justified as fixed. - Metamorphic test: every preset and every
performance-onlysetting produces byte-identical output on the golden corpus (#75). -
low-memorymeets a published RSS target on the kernel and large Java/.NET corpus entries under a cgroup limit, withfast's speed-up and cost measured alongside. - Effective settings are present in every JSON report and
--statsoutput.
Part of the 1.0 quality program: #83. Epic: #81.
- Lingua principale
- Go
- Stelle
- 0
- Fork
- 0
- Merge medio
- 5h 8m
- PR unite (30g)
- 54
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di war-and-code/dircue
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
war-and-code/dircue#200 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement follow-up
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
war-and-code/dircue#201 ·
I maintainer di solito rispondono entro 1 giorno
-
follow-up
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
war-and-code/dircue#179 ·
I maintainer di solito rispondono entro 1 giorno
-
follow-up
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
war-and-code/dircue#178 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement follow-up
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
war-and-code/dircue#172 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di war-and-code/dircue
Issue simili
-
agent-review-finding bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
jordansmall/spindrift#5281 ·
I maintainer di solito rispondono entro 1 giorno
-
unbounded value for n in `/v1/logs` can panic/OOMForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertasmall item
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
canonical/pebble#1127 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
[schema-coverage] elasticstack_elasticsearch_synonym_set (data source)Forse già presa @github-actions l’ha presa oggi. Apertaacceptance-tests phase-coding schema-coverage testing triaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 81/100
elastic/terraform-provider-elasticstack#5211 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 89/100
open-policy-agent/opa#9366 · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
defect
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
nats-io/nats-server#8752 ·
I maintainer di solito rispondono entro 1 giorno