Skip to content

Commit c1a384c

Browse files
committed
Accidentally scaled values by multiples of 1024, not 1000
1 parent ef1465d commit c1a384c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/protocol/messaging.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -189,22 +189,22 @@ pub fn prepare_upload_configuration(args:&clap::ArgMatches, test_id:&[u8; 16]) -
189189
Some(v) => {
190190
match v {
191191
'k' => { //kilobits
192-
bandwidth_multiplier = 1024.0 / 8.0;
192+
bandwidth_multiplier = 1000.0 / 8.0;
193193
},
194194
'K' => { //kilobytes
195-
bandwidth_multiplier = 1024.0;
195+
bandwidth_multiplier = 1000.0;
196196
},
197197
'm' => { //megabits
198-
bandwidth_multiplier = 1024.0 * 1024.0 / 8.0;
198+
bandwidth_multiplier = 1000.0 * 1000.0 / 8.0;
199199
},
200200
'M' => { //megabytes
201-
bandwidth_multiplier = 1024.0 * 1024.0;
201+
bandwidth_multiplier = 1000.0 * 1000.0;
202202
},
203203
'g' => { //gigabits
204-
bandwidth_multiplier = 1024.0 * 1024.0 * 1024.0 / 8.0;
204+
bandwidth_multiplier = 1000.0 * 1000.0 * 1000.0 / 8.0;
205205
},
206206
'G' => { //gigabytes
207-
bandwidth_multiplier = 1024.0 * 1024.0 * 1024.0;
207+
bandwidth_multiplier = 1000.0 * 1000.0 * 1000.0;
208208
},
209209
_ => {
210210
bandwidth_multiplier = 1.0;

0 commit comments

Comments
 (0)