Skip to main content

locust

"It's git diff --stat on steroids!" - @scottmilliken

What is Locust?

Locust reduces turnaround time on code reviews.

It can take a lot of effort for a reviewer to relate the line-by-line changes in a patch to their mental model of the code base. This is a consistent impediment to fast responses on code reviews.

Locust provides a semantic layer on top of git diff. Where git diff describes changes in terms of the lines in the code base, Locust summarizes changes by the effect on modules, classes, and functions.

How does it work?

Locust is a command line tool, and you can invoke it as:

locust 22dd7fd6adf392bb29d13d10f10e7dbb1d97bfce c9813bd5871a9919551ccd917712135c40367c5c --format yaml

This produces the following output:

locust:
  - file: locust/ci_helpers/github.py
    changes:
      - name: generate_argument_parser
        type: function
        line: 11
        changed_lines: 9
        total_lines: 9
        children: []
      - name: helper_push
        type: function
        line: 22
        changed_lines: 13
        total_lines: 13
        children: []
      - name: helper_pr
        type: function
        line: 37
        changed_lines: 14
        total_lines: 14
        children: []
      - name: main
        type: function
        line: 53
        changed_lines: 29
        total_lines: 29
        children: []
refs:
  initial: 22dd7fd
  terminal: c9813bd

CI/CD

Locust is easy to use in CI/CD pipelines:

Installation

Locust requires Python3 (specifically, it was written in Python3.8).

Install from PyPI

pip install bugout-locust

Install from source

Clone this repository and run from the project root:

python setup.py install

Docker

You can also use the Locust docker image:

docker pull bugout/locust

To run Locust using docker:

docker run -v $ABSOLUTE_PATH_TO_GIT_REPO:/usr/src/app bugout/locust -r /usr/src/app \
    $INITIAL_REVISION \
    $TERMINAL_REVISION \
    --format yaml

Output formats

Locust can produce output in many formats. The currently supported formats are:

  1. JSON (--format json)

  2. YAML (--format yaml)

  3. HTML (--format html)

  4. GitHub-flavored HTML, meant to be used with GitHub styles (--format html-github)

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bugout-locust-0.1.4.tar.gz (10.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bugout_locust-0.1.4-py3-none-any.whl (13.4 kB view details)

Uploaded Python 3

File details

Details for the file bugout-locust-0.1.4.tar.gz.

File metadata

  • Download URL: bugout-locust-0.1.4.tar.gz
  • Upload date:
  • Size: 10.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5

File hashes

Hashes for bugout-locust-0.1.4.tar.gz
Algorithm Hash digest
SHA256 a751b1961240d39da0f3a33c54d7479980132adc79224fa2f5c98edf532e20d7
MD5 3dfef8486b8f534a0196d5d98bd41ea8
BLAKE2b-256 396ec6ed6a86a1bde137924f29a63b3cd16bab0b01b98636f5f709062a0657ba

See more details on using hashes here.

File details

Details for the file bugout_locust-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: bugout_locust-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 13.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5

File hashes

Hashes for bugout_locust-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 eb4de786136fdd6f219cfae0a7cf35e1fc4ead37c66755552fc04552ae2889e7
MD5 55a4bd3cf9a3f334ec715f7b55863da6
BLAKE2b-256 f8fcbd38e97fd39284ee40d84321f5e85ae6d44d5c0dd63db722e34ef2885327

See more details on using hashes here.

Release history Release notifications | RSS feed

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.2.8

2 files

0.2.7

2 files

0.2.6

2 files

0.2.5

2 files

0.2.4

2 files

0.2.3

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.5

2 files

This release

0.1.4 This release

2 files

0.1.3

2 files

0.1.2

2 files

0.1.0

3 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page