Skip to content
المشاريع

حول

Rust Based Multi-language Static Analyser & Test Instrumentation

أدوات التطوير

كيف تُقاس هذه الأرقام

النمو المقاس للنجوم

خلال 24 ساعة
جارٍ جمع السجل
خلال 7 أيام
جارٍ جمع السجل
خلال 15 يومًا
جارٍ جمع السجل
خلال شهر
جارٍ جمع السجل

تغيّر صافي النجوم خلال فترات متداخلة، وليس مجموعًا يوميًا. تبقى القياسات المفقودة فارغة. النجوم تقيس الاهتمام لا جودة البرمجيات.

README.md

الأصل

Code Change Capture Logo

Release Code Change Capture

Code Change Capture (ccc)

The ccc static analyser maps your project into memory in under half a second. It supports C99, C++20 (except modules), C#, Rust, Go, Python, Zig, Odin, TypeScript, JavaScript and Protobuf.

Before you commit, it shows everything a change touches: the functions, tests and services it reaches, the contracts between services, dependencies and vulnerabilities.

It can also name every test your change is covered by, across all of your suites. Record one run of them with ccc's probes in, and ccc follows every test (unit, contract, interop, integration, smoke or load) through every function called: in its own process and in every service called over HTTP or gRPC.

Whether written in Go, Rust, C++, TypeScript, Python, each process records what it ran for each test, and ccc joins those records into one per test. For any change, ccc then lists every test that ran the changed code, and the cheapest set of them that still runs all of it, with the commands to run them.

This aims to help teams make changes faster, improve the developer experience and eliminate the long wait times for CI and CT.

Know which tests ran your code, in every language

Each language's coverage tool sees only its own language and merges a whole run into one report. Run a Python suite against a Go service and you get a Go report and a Python report, with nothing linking a Python test to the Go functions it made run. When a Go function changes, nothing tells you which tests reach it, so CI runs them all.

ccc closes that gap: one recorded run ties every test to every function it ran, in every service and language. For a change, ccc then names the tests that ran the changed functions, instead of every suite that might reach them.

How can we calculate every single covered call in a project? explains how, and compares ccc with per-language coverage tools.

Install

curl -fsSL https://raw.githubusercontent.com/colwill/ccc/main/install.sh | bash

Or build it from source:

cargo build --release && ./target/release/ccc install

ccc alone does the analysis a pipeline needs. Serving the map to agents, ccc's edit tools, the visualiser, transcript reports and replays are plugins, each versioned and released with every ccc release:

ccc add server edit vis   # `ccc run`, the edit tools, the visualiser
ccc add agents replay     # PR summaries and rule violations; replays of agent sessions
ccc plugins               # what is added here

Plugins lists what each one adds.

Choose how to use it

1. CLI

Run ccc from a terminal or a pipeline. Serve the map to your agents, see what a branch changed, and gate CI on tests, dependencies and security findings.

CLI.md has one section per command: the command, its options, and what it is for.

ServiceMap.md explains .ccc/map.json: how to describe the services in a monorepo, how to check ccc sees them correctly, and how CI uses it to pick the services and tests a change needs.

2. Runtime Instrumentation for CI/CD

Record one run of your test suites with ccc's probes in, on your default branch nightly or on every merge. ccc then knows which tests actually ran which functions, across every service and language they passed through, so for any change CI runs only the tests that ran the changed code. Know which tests ran your code explains the problem it solves.

Instrumentation.md covers how ccc calculates every covered call, how tests and services are instrumented, and how to record in CI.

3. Developers & Agents

Watch and review the work. Explore the project in the architecture visualiser, get hints in VS Code, and replay how an agent made a change.

Developers & Agents has one section each for the visualiser, IDEs and replays.

Speed

Measured with ccc scan PATH --no-parse-cache (cold) and again with a warm parse cache, on an i7-11800H with 16 threads and files on tmpfs:

Corpus Files Lines Cold Warm Cold, 4 CPUs
this repository 78 60k 0.12–0.14 s 0.01–0.015 s 0.16 s (1 CPU: 0.55 s)
tokio 573 148k 0.13 s 0.015 s 0.24 s
Go cmd/compile 723 477k 0.60 s 0.05 s 0.91 s
4 Python packages 1,523 559k 0.40 s 0.04 s 0.77 s
9 Rust crates 1,951 1.18M 0.97 s 0.09 s –
Go standard library 7,213 2.24M 2.12 s 0.22 s –
Python dist-packages 18,711 5.86M 4.03 s 0.43 s –
  • Target is under half a second for less than 500k LOC
  • On cold scans it holds up to roughly half a million lines on 16 threads, and 0.2–0.3M lines on 4 CPUs.
  • Warm parse cache holds up to almost 6M lines.
  • ccc changes adds 18 ms on the fixture and 78 ms for a 364-function pull request on this repository, both with a warm cache.

استكشف مشاريع مشابهة ومرتبطة

جارٍ التحميل…