@@ -7,8 +7,8 @@ use torrust_torrent_repository_benchmarks::benches::asyn::{
7
7
use torrust_torrent_repository_benchmarks:: benches:: sync:: {
8
8
add_multiple_torrents_in_parallel, add_one_torrent, update_multiple_torrents_in_parallel, update_one_torrent_in_parallel,
9
9
} ;
10
- use torrust_tracker:: core:: torrent:: repository_asyn:: { Async , AsyncSync , RepositoryAsyncSingle } ;
11
- use torrust_tracker:: core:: torrent:: repository_sync:: { Sync , SyncSingle } ;
10
+ use torrust_tracker:: core:: torrent:: repository_asyn:: { TorrentsAsync , TorrentsAsyncSingle , TorrentsAsyncSync } ;
11
+ use torrust_tracker:: core:: torrent:: repository_sync:: { TorrentsSync , TorrentsSyncSingle } ;
12
12
13
13
#[ allow( clippy:: too_many_lines) ]
14
14
#[ allow( clippy:: print_literal) ]
@@ -26,22 +26,22 @@ fn main() {
26
26
println ! (
27
27
"{}: Avg/AdjAvg: {:?}" ,
28
28
"add_one_torrent" ,
29
- rt. block_on( async_add_one_torrent:: <RepositoryAsyncSingle >( 1_000_000 ) )
29
+ rt. block_on( async_add_one_torrent:: <TorrentsAsyncSingle >( 1_000_000 ) )
30
30
) ;
31
31
println ! (
32
32
"{}: Avg/AdjAvg: {:?}" ,
33
33
"update_one_torrent_in_parallel" ,
34
- rt. block_on( async_update_one_torrent_in_parallel:: <RepositoryAsyncSingle >( & rt, 10 ) )
34
+ rt. block_on( async_update_one_torrent_in_parallel:: <TorrentsAsyncSingle >( & rt, 10 ) )
35
35
) ;
36
36
println ! (
37
37
"{}: Avg/AdjAvg: {:?}" ,
38
38
"add_multiple_torrents_in_parallel" ,
39
- rt. block_on( async_add_multiple_torrents_in_parallel:: <RepositoryAsyncSingle >( & rt, 10 ) )
39
+ rt. block_on( async_add_multiple_torrents_in_parallel:: <TorrentsAsyncSingle >( & rt, 10 ) )
40
40
) ;
41
41
println ! (
42
42
"{}: Avg/AdjAvg: {:?}" ,
43
43
"update_multiple_torrents_in_parallel" ,
44
- rt. block_on( async_update_multiple_torrents_in_parallel:: <RepositoryAsyncSingle >( & rt, 10 ) )
44
+ rt. block_on( async_update_multiple_torrents_in_parallel:: <TorrentsAsyncSingle >( & rt, 10 ) )
45
45
) ;
46
46
47
47
if let Some ( true ) = args. compare {
@@ -51,42 +51,46 @@ fn main() {
51
51
println ! (
52
52
"{}: Avg/AdjAvg: {:?}" ,
53
53
"add_one_torrent" ,
54
- add_one_torrent:: <SyncSingle >( 1_000_000 )
54
+ add_one_torrent:: <TorrentsSyncSingle >( 1_000_000 )
55
55
) ;
56
56
println ! (
57
57
"{}: Avg/AdjAvg: {:?}" ,
58
58
"update_one_torrent_in_parallel" ,
59
- rt. block_on( update_one_torrent_in_parallel:: <SyncSingle >( & rt, 10 ) )
59
+ rt. block_on( update_one_torrent_in_parallel:: <TorrentsSyncSingle >( & rt, 10 ) )
60
60
) ;
61
61
println ! (
62
62
"{}: Avg/AdjAvg: {:?}" ,
63
63
"add_multiple_torrents_in_parallel" ,
64
- rt. block_on( add_multiple_torrents_in_parallel:: <SyncSingle >( & rt, 10 ) )
64
+ rt. block_on( add_multiple_torrents_in_parallel:: <TorrentsSyncSingle >( & rt, 10 ) )
65
65
) ;
66
66
println ! (
67
67
"{}: Avg/AdjAvg: {:?}" ,
68
68
"update_multiple_torrents_in_parallel" ,
69
- rt. block_on( update_multiple_torrents_in_parallel:: <SyncSingle >( & rt, 10 ) )
69
+ rt. block_on( update_multiple_torrents_in_parallel:: <TorrentsSyncSingle >( & rt, 10 ) )
70
70
) ;
71
71
72
72
println ! ( ) ;
73
73
74
74
println ! ( "std::sync::RwLock<std::collections::BTreeMap<InfoHash, Arc<std::sync::Mutex<Entry>>>>" ) ;
75
- println ! ( "{}: Avg/AdjAvg: {:?}" , "add_one_torrent" , add_one_torrent:: <Sync >( 1_000_000 ) ) ;
75
+ println ! (
76
+ "{}: Avg/AdjAvg: {:?}" ,
77
+ "add_one_torrent" ,
78
+ add_one_torrent:: <TorrentsSync >( 1_000_000 )
79
+ ) ;
76
80
println ! (
77
81
"{}: Avg/AdjAvg: {:?}" ,
78
82
"update_one_torrent_in_parallel" ,
79
- rt. block_on( update_one_torrent_in_parallel:: <Sync >( & rt, 10 ) )
83
+ rt. block_on( update_one_torrent_in_parallel:: <TorrentsSync >( & rt, 10 ) )
80
84
) ;
81
85
println ! (
82
86
"{}: Avg/AdjAvg: {:?}" ,
83
87
"add_multiple_torrents_in_parallel" ,
84
- rt. block_on( add_multiple_torrents_in_parallel:: <Sync >( & rt, 10 ) )
88
+ rt. block_on( add_multiple_torrents_in_parallel:: <TorrentsSync >( & rt, 10 ) )
85
89
) ;
86
90
println ! (
87
91
"{}: Avg/AdjAvg: {:?}" ,
88
92
"update_multiple_torrents_in_parallel" ,
89
- rt. block_on( update_multiple_torrents_in_parallel:: <Sync >( & rt, 10 ) )
93
+ rt. block_on( update_multiple_torrents_in_parallel:: <TorrentsSync >( & rt, 10 ) )
90
94
) ;
91
95
92
96
println ! ( ) ;
@@ -95,22 +99,22 @@ fn main() {
95
99
println ! (
96
100
"{}: Avg/AdjAvg: {:?}" ,
97
101
"add_one_torrent" ,
98
- rt. block_on( async_add_one_torrent:: <AsyncSync >( 1_000_000 ) )
102
+ rt. block_on( async_add_one_torrent:: <TorrentsAsyncSync >( 1_000_000 ) )
99
103
) ;
100
104
println ! (
101
105
"{}: Avg/AdjAvg: {:?}" ,
102
106
"update_one_torrent_in_parallel" ,
103
- rt. block_on( async_update_one_torrent_in_parallel:: <AsyncSync >( & rt, 10 ) )
107
+ rt. block_on( async_update_one_torrent_in_parallel:: <TorrentsAsyncSync >( & rt, 10 ) )
104
108
) ;
105
109
println ! (
106
110
"{}: Avg/AdjAvg: {:?}" ,
107
111
"add_multiple_torrents_in_parallel" ,
108
- rt. block_on( async_add_multiple_torrents_in_parallel:: <AsyncSync >( & rt, 10 ) )
112
+ rt. block_on( async_add_multiple_torrents_in_parallel:: <TorrentsAsyncSync >( & rt, 10 ) )
109
113
) ;
110
114
println ! (
111
115
"{}: Avg/AdjAvg: {:?}" ,
112
116
"update_multiple_torrents_in_parallel" ,
113
- rt. block_on( async_update_multiple_torrents_in_parallel:: <AsyncSync >( & rt, 10 ) )
117
+ rt. block_on( async_update_multiple_torrents_in_parallel:: <TorrentsAsyncSync >( & rt, 10 ) )
114
118
) ;
115
119
116
120
println ! ( ) ;
@@ -119,22 +123,22 @@ fn main() {
119
123
println ! (
120
124
"{}: Avg/AdjAvg: {:?}" ,
121
125
"add_one_torrent" ,
122
- rt. block_on( async_add_one_torrent:: <Async >( 1_000_000 ) )
126
+ rt. block_on( async_add_one_torrent:: <TorrentsAsync >( 1_000_000 ) )
123
127
) ;
124
128
println ! (
125
129
"{}: Avg/AdjAvg: {:?}" ,
126
130
"update_one_torrent_in_parallel" ,
127
- rt. block_on( async_update_one_torrent_in_parallel:: <Async >( & rt, 10 ) )
131
+ rt. block_on( async_update_one_torrent_in_parallel:: <TorrentsAsync >( & rt, 10 ) )
128
132
) ;
129
133
println ! (
130
134
"{}: Avg/AdjAvg: {:?}" ,
131
135
"add_multiple_torrents_in_parallel" ,
132
- rt. block_on( async_add_multiple_torrents_in_parallel:: <Async >( & rt, 10 ) )
136
+ rt. block_on( async_add_multiple_torrents_in_parallel:: <TorrentsAsync >( & rt, 10 ) )
133
137
) ;
134
138
println ! (
135
139
"{}: Avg/AdjAvg: {:?}" ,
136
140
"update_multiple_torrents_in_parallel" ,
137
- rt. block_on( async_update_multiple_torrents_in_parallel:: <Async >( & rt, 10 ) )
141
+ rt. block_on( async_update_multiple_torrents_in_parallel:: <TorrentsAsync >( & rt, 10 ) )
138
142
) ;
139
143
}
140
144
}
0 commit comments