File tree Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -54,8 +54,9 @@ let now = Instant::now();
54
54
. unwrap_or_else (| _ | cmd_die! (" thread $i failed" ));
55
55
cmd_info! (" thread $i bandwidth: $bandwidth" );
56
56
});
57
- let total_bandwidth =
58
- Byte :: from_bytes ((DATA_SIZE / now . elapsed (). as_secs ()) as u128 ). get_appropriate_unit (true );
57
+ let total_bandwidth = Byte :: from_bytes ((DATA_SIZE / now . elapsed (). as_secs ()) as u128 )
58
+ . get_appropriate_unit (true )
59
+ . to_string ();
59
60
cmd_info! (" Total bandwidth: ${total_bandwidth}/s" );
60
61
```
61
62
Original file line number Diff line number Diff line change @@ -57,8 +57,9 @@ fn main() -> CmdResult {
57
57
. unwrap_or_else ( |_| cmd_die ! ( "thread $i failed" ) ) ;
58
58
cmd_info ! ( "thread $i bandwidth: $bandwidth" ) ;
59
59
} ) ;
60
- let total_bandwidth =
61
- Byte :: from_bytes ( ( DATA_SIZE / now. elapsed ( ) . as_secs ( ) ) as u128 ) . get_appropriate_unit ( true ) ;
60
+ let total_bandwidth = Byte :: from_bytes ( ( DATA_SIZE / now. elapsed ( ) . as_secs ( ) ) as u128 )
61
+ . get_appropriate_unit ( true )
62
+ . to_string ( ) ;
62
63
cmd_info ! ( "Total bandwidth: ${total_bandwidth}/s" ) ;
63
64
64
65
Ok ( ( ) )
Original file line number Diff line number Diff line change 60
60
//! .unwrap_or_else(|_| cmd_die!("thread $i failed"));
61
61
//! cmd_info!("thread $i bandwidth: $bandwidth");
62
62
//! });
63
- //! let total_bandwidth =
64
- //! Byte::from_bytes((DATA_SIZE / now.elapsed().as_secs()) as u128).get_appropriate_unit(true);
63
+ //! let total_bandwidth = Byte::from_bytes((DATA_SIZE / now.elapsed().as_secs()) as u128)
64
+ //! .get_appropriate_unit(true)
65
+ //! .to_string();
65
66
//! cmd_info!("Total bandwidth: ${total_bandwidth}/s");
66
67
//! # Ok::<(), std::io::Error>(())
67
68
//! ```
You can’t perform that action at this time.
0 commit comments