jepsen-io / elle

Black-box transactional safety checker based on cycle detection
Eclipse Public License 2.0
634 stars 34 forks source link

Remove dead code #14

Closed ligurio closed 2 years ago

ligurio commented 2 years ago

I have run elle's regression test suite with cloverage, the project has a nice code coverage! However, some functions are not covered by tests and unused at all. These functions look as a dead code: txn/all-keys, rw-register/gen, list-append/g1c-graph and seems can be removed.

HTML report generated by Cloverage: https://bronevichok.ru/static/elle-coverage/

ligurio commented 2 years ago

Code coverage summary below and HTML report by link added above is for elle's code without proposed changes.


|------------------------+---------+---------|
|              Namespace | % Forms | % Lines |
|------------------------+---------+---------|
| elle.consistency-model |   97.61 |   98.13 |
|              elle.core |   79.81 |   93.46 |
|             elle.graph |   94.78 |   93.81 |
|       elle.list-append |   87.09 |   93.53 |
|       elle.rw-register |   94.88 |   97.68 |
|               elle.txn |   91.24 |   96.93 |
|              elle.util |  100.00 |  100.00 |
|               elle.viz |   82.14 |   90.08 |
|------------------------+---------+---------|
|              ALL FILES |   89.84 |   95.05 |
|------------------------+---------+---------|
aphyr commented 2 years ago

Uhhh, that generator is part of the library's public API--please don't delete it

ligurio commented 2 years ago

Uhhh, that generator is part of the library's public API--please don't delete it

Reverted change for rw-register/gen.

aphyr commented 2 years ago

all-keys is particularly helpful for exploring histories at the REPL, so I don't want to get rid of that either. I thiiiink g1c-graph might be safe to remove--that might be a vestige from before I wrote the elle.txn lazy graph merging code. I'll go ahead and remove that in a different commit, so that I don't mess up git-blame history.