RepoDNA Documentation

Benchmarks

How long repodna analyze takes on the fixture repositories and on RepoDNA itself, measured with cargo xtask bench.

Method#

  • A release build of the command-line tool (cargo build --release -p repodna-cli).
  • Each row runs repodna analyze <path> --profile <profile> --format json --no-store --no-cache five times and reports the median wall-clock time. That includes starting the process, reading every file, running Git, and writing the JSON artifact.
  • --no-cache and --no-store make every run a full analysis. With the cache (the default), analyzing an unchanged repository again skips parsing files it has already seen.
  • Files, code lines, and commits are read from each run's artifact.
  • The fixture repositories are generated by cargo xtask fixtures; see fixtures/README.md. The large fixture has 5,000 generated source files and 120 commits.

Results#

RepoDNA 1.0.0 on Linux x86_64 with 4 logical CPUs (Intel Xeon, 2.8 GHz), 15 GB of memory, and Git 2.43.0. "This repository" is RepoDNA at commit 7b635e5.

Repository Profile Files Code lines Commits Median time
fixture tiny standard 7 68 3 0.06 s
fixture polyglot standard 17 146 3 0.07 s
fixture monorepo standard 16 116 1 0.06 s
fixture history standard 12 56 15 0.09 s
fixture no-git standard 4 32 0 0.03 s
fixture duplicated standard 6 143 1 0.06 s
fixture cyclic standard 6 37 1 0.07 s
fixture generated standard 7 330 1 0.07 s
fixture undocumented standard 4 28 1 0.05 s
fixture secrets standard 8 21 1 0.06 s
fixture build-failure standard 4 13 1 0.05 s
fixture test-failure standard 4 17 1 0.05 s
fixture unsupported standard 4 22 1 0.05 s
fixture archived standard 8 48 4 0.08 s
fixture large quick 5004 28351 0 0.14 s
fixture large standard 5004 28351 120 0.76 s
fixture large deep 5004 28351 120 1.43 s
this repository quick 361 93820 0 0.17 s
this repository standard 361 93820 264 0.59 s
this repository deep 361 93820 264 1.12 s

What the profiles do:

  • quick reads the current files only: structure, languages, metrics, and project conventions. It does not read Git history.
  • standard adds Git history, dependencies, architecture, quality, security, and the evolution timeline.
  • deep also looks for duplicated and similar code and reconstructs the architecture at every Time Machine snapshot.

Small repositories take well under a tenth of a second, most of it spent running Git. Your numbers will differ with the machine, the disk, the Git version, and the size of the history.

Running the benchmark#

cargo build --release -p repodna-cli
cargo xtask fixtures
cargo xtask bench --runs 5

cargo xtask bench prints the table above. Options:

  • --repodna PATH times another build of repodna.
  • --fixtures DIR reads fixtures from another directory (default fixtures/generated).
  • --runs N sets how many times each row runs (default 3).

cargo xtask fixtures --large-files N --large-commits N changes the size of the large fixture.

Edit this page on GitHub