Skip to content

Commit

Permalink
extsort: consistent units for consts; log mem used
Browse files Browse the repository at this point in the history
  • Loading branch information
jqnatividad committed May 14, 2022
1 parent 748e01e commit 83e7e52
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/cmd/extsort.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ struct Args {
}

const MEMORY_LIMITED_BUFFER: u64 = 100 * 1_000_000; // 100 MB
const RW_BUFFER_CAPACITY: usize = 1000 * (1 << 10); // 1 MB
const RW_BUFFER_CAPACITY: usize = 1_000_000; // 1 MB

pub fn run(argv: &[&str]) -> CliResult<()> {
let args: Args = util::get_args(USAGE, argv)?;
Expand All @@ -58,6 +58,7 @@ pub fn run(argv: &[&str]) -> CliResult<()> {
} else {
MEMORY_LIMITED_BUFFER
};
log::info!("{mem_limited_buffer} bytes used for in memory mergesort buffer...");

let mut input_reader = io::BufReader::new(fs::File::open(&args.arg_input)?);

Expand Down

0 comments on commit 83e7e52

Please sign in to comment.