feat: added benchmarking binary for torrent repository struct#522
feat: added benchmarking binary for torrent repository struct#522josecelano merged 3 commits intotorrust:developfrom
Conversation
b3be8d4 to
0230ccd
Compare
|
Hi @josecelano, I have a failing test for the connection cookie response. I saw that you wrote a comment that the response can change between versions, but it is not sure to me why this changes. Should I just update the test constant with the new cookie response? |
|
hello @WarmBeer , just add the new hashed-version to the list: https://github.com/torrust/torrust-tracker/blob/develop/src/servers/udp/connection_cookie.rs#L176 |
|
Looks like you have been using a old version of the code as you base. If you rebase maybe the connection cookie hash error will disappear. |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## develop #522 +/- ##
===========================================
- Coverage 84.20% 79.57% -4.63%
===========================================
Files 110 117 +7
Lines 7286 7747 +461
===========================================
+ Hits 6135 6165 +30
- Misses 1151 1582 +431 ☔ View full report in Codecov by Sentry. |
291af10 to
0230ccd
Compare
0230ccd to
2b56847
Compare
2b56847 to
ed75d93
Compare
|
The contract pipeline job doesn't like my |
|
We do not have any !feature directives in our cow now... maybe the crate supplies a similar thing until it is stabilised? |
68a9be1 to
c1fbfea
Compare
|
@WarmBeer: Rebased and Fixed Clippy |
c1fbfea to
226ea1a
Compare
a10f466 to
100eb00
Compare
4be7ec8 to
2c79be5
Compare
2c79be5 to
6b5b5ea
Compare
6b5b5ea to
b0a1bb0
Compare
|
@WarmBeer I have got the CI to pass, by disabling the Stable Matrix Options, and Moving the ContainerFile to use the rust nightly. |
|
Hi @WarmBeer this needs a rebase. |
|
Hi @WarmBeer the command in the PR description is wrong: cargo run --release -p torrust-torrent-repository-benchmarks -- --threads 4 --sleep 0 --compare trueinstead of: cargo run --release -p torrust-torrent-repository-benchmarks -- -threads 4 --sleep 0 -compare trueThis is the result on my machine: $ cargo run --release -p torrust-torrent-repository-benchmarks -- --threads 4 --sleep 0 --compare true
Finished release [optimized + debuginfo] target(s) in 0.07s
Running `target/release/torrust-torrent-repository-benchmarks --threads 4 --sleep 0 --compare true`
tokio::sync::RwLock<std::collections::BTreeMap<InfoHash, Entry>>
add_one_torrent: Avg/AdjAvg: (57ns, 59ns)
update_one_torrent_in_parallel: Avg/AdjAvg: (15.552808ms, 15.806128ms)
add_multiple_torrents_in_parallel: Avg/AdjAvg: (20.473951ms, 20.818356ms)
update_multiple_torrents_in_parallel: Avg/AdjAvg: (17.505768ms, 17.723086ms)
std::sync::RwLock<std::collections::BTreeMap<InfoHash, Entry>>
add_one_torrent: Avg/AdjAvg: (49ns, 49ns)
update_one_torrent_in_parallel: Avg/AdjAvg: (5.951511ms, 5.951511ms)
add_multiple_torrents_in_parallel: Avg/AdjAvg: (8.636744ms, 8.636744ms)
update_multiple_torrents_in_parallel: Avg/AdjAvg: (6.938437ms, 6.938437ms)
std::sync::RwLock<std::collections::BTreeMap<InfoHash, Arc<std::sync::Mutex<Entry>>>>
add_one_torrent: Avg/AdjAvg: (59ns, 59ns)
update_one_torrent_in_parallel: Avg/AdjAvg: (6.11163ms, 6.11163ms)
add_multiple_torrents_in_parallel: Avg/AdjAvg: (12.533224ms, 12.533224ms)
update_multiple_torrents_in_parallel: Avg/AdjAvg: (8.529448ms, 8.529448ms)
tokio::sync::RwLock<std::collections::BTreeMap<InfoHash, Arc<std::sync::Mutex<Entry>>>>
add_one_torrent: Avg/AdjAvg: (89ns, 89ns)
update_one_torrent_in_parallel: Avg/AdjAvg: (6.823796ms, 6.823796ms)
add_multiple_torrents_in_parallel: Avg/AdjAvg: (27.933274ms, 27.933274ms)
update_multiple_torrents_in_parallel: Avg/AdjAvg: (8.692325ms, 8.310186ms)
tokio::sync::RwLock<std::collections::BTreeMap<InfoHash, Arc<tokio::sync::Mutex<Entry>>>>
add_one_torrent: Avg/AdjAvg: (111ns, 107ns)
update_one_torrent_in_parallel: Avg/AdjAvg: (14.997225ms, 15.177959ms)
add_multiple_torrents_in_parallel: Avg/AdjAvg: (29.507577ms, 29.961334ms)
update_multiple_torrents_in_parallel: Avg/AdjAvg: (9.156453ms, 9.367261ms) |
3289efd to
6087e4f
Compare
|
Hi @josecelano @da2ce7 , The pipeline is failing on a Docker job. Is it possible to make the Docker container use the Rust nightly channel to fix this? |
f5184de to
ebb7d4c
Compare
|
Pipeline is failing on an existing error in our code. Probably because the newer nightly builds have introduced this change: error: item in documentation is missing backticks
--> contrib/bencode/src/reference/decode_opt.rs:44:90
|
44 | /// rest of the payload starts that wasn't decoded, get the bencode buffer, and call len().
| ^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
= note: `-D clippy::doc-markdown` implied by `-D clippy::pedantic`
= help: to override `-D clippy::pedantic` add `#[allow(clippy::doc_markdown)]`
help: try
|
44 | /// rest of the payload starts that wasn't decoded, get the bencode buffer, and call `len()`.
| ~~~~~~~I will make a PR for this |
Moved the
Tracker.torrentsfield to be its ownTorrentRepositorystruct with different implementations.Added a new crate that benchmarks the different
TorrentRepositoryimplementations for speed.Run benchmarks
cargo run --release -p torrust-torrent-repository-benchmarks -- --threads 4 --sleep 0 --compare trueExample result
Relevant issues
#496
#495