Skip to content

Commit cb51ec9

Browse files
committed
docs: [torrust#1495] improve torrent-repository pkg readme
1 parent e1fd309 commit cb51ec9

File tree

1 file changed

+10
-20
lines changed

1 file changed

+10
-20
lines changed

packages/torrent-repository/README.md

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,16 @@
22

33
A library to provide a torrent repository to the [Torrust Tracker](https://github.com/torrust/torrust-tracker).
44

5-
## Benchmarking
6-
7-
```console
8-
cargo bench -p torrust-tracker-torrent-repository
9-
```
10-
11-
Example partial output:
12-
13-
```output
14-
Running benches/repository_benchmark.rs (target/release/deps/repository_benchmark-a9b0013c8d09c3c3)
15-
add_one_torrent/RwLockStd
16-
time: [63.057 ns 63.242 ns 63.506 ns]
17-
Found 12 outliers among 100 measurements (12.00%)
18-
2 (2.00%) low severe
19-
2 (2.00%) low mild
20-
2 (2.00%) high mild
21-
6 (6.00%) high severe
22-
add_one_torrent/RwLockStdMutexStd
23-
time: [62.505 ns 63.077 ns 63.817 ns]
24-
```
5+
Its main responsibilities include:
6+
7+
- Managing Torrent Entries: It stores, retrieves, and manages torrent entries, which are torrents being tracked.
8+
- Persistence: It supports lading tracked torrents from a persistent storage, ensuring that torrent data can be restored across restarts.
9+
- Pagination and sorting: It provides paginated and stable/sorted access to torrent entries.
10+
- Peer management: It manages peers associated with torrents, including removing inactive peers and handling torrents with no peers (peerless torrents).
11+
- Policy handling: It supports different policies for handling torrents, such as persisting, removing, or custom policies for torrents with no peers.
12+
- Metrics: It can provide metrics about the torrents, such as counts or statuses, likely for monitoring or statistics.
13+
14+
This repo is a core component for managing the state and lifecycle of torrents and their peers in a BitTorrent tracker, with peer management, and flexible policies.
2515

2616
## Documentation
2717

0 commit comments

Comments
 (0)