Skip to content

Commit

Permalink
Update ReadMe to mention the newly added dependency counts
Browse files Browse the repository at this point in the history
  • Loading branch information
mkp committed Nov 15, 2024
1 parent 2ec44bd commit 833ab32
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions maxdiff/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,23 +26,25 @@ Readable diffs are very useful for patch code review, or for a sanity check befo

### Using the frozen device statistics

`maxdiff` currently uses two different ways to count object instances and connections:
For frozen devices, `maxdiff` reports statistics. This feature can be used in a way comparable to [`git diff --numstat`](https://git-scm.com/docs/git-diff#Documentation/git-diff.txt---numstat) to indicate the amount of change in a commit.

Currently, it reports the number of object instances and connections of a device in two different ways:

* Total - Counting every abstraction instance - Indicates loading time
* This recursively counts the contents of all subpatchers and abstraction instances
* Unique - Counting abstractions once - Indicates maintainability
* This counts the contents once of every dependency frozen into the device.

This feature can be used in a way comparable to [`git diff --numstats`](https://git-scm.com/docs/git-diff#Documentation/git-diff.txt---numstat) to indicate the amount of change in a commit.
Apart from that it reports the amount of times dependencies are used.

Note that we typically don't commit frozen devices to a repo, so the typical way to use this feature is:
We typically don't commit frozen devices to a repo, so the typical way to use this feature is:

1. Commit the device and its dependencies in **un**frozen state.
2. Temporarily freeze the device.
3. Run `python3 ./maxdiff/amxd_textconv.py <path/to/device.amxd>` to get the statistics or view the file in your git client.
4. Discard the freezing.

Note: the reason this only works with frozen devices is that these unambiguously capture all dependencies.
The reason this only works with frozen devices is that frozen devices unambiguously capture all dependencies.

### What does not work

Expand Down

0 comments on commit 833ab32

Please sign in to comment.