Skip to content

Instantly share code, notes, and snippets.

@jayhuang75
Last active April 29, 2022 02:36
Show Gist options
  • Select an option

  • Save jayhuang75/32b1cc5c72a3079fb23f597d154ae2de to your computer and use it in GitHub Desktop.

Select an option

Save jayhuang75/32b1cc5c72a3079fb23f597d154ae2de to your computer and use it in GitHub Desktop.
rust-velocity-limit-main
fn main() {
let start = Instant::now();
let read_path = "./path/input.txt";
let write_path = "./path/output.txt";
let limit = Limit{
daily_max_amount: 5000.00,
weekly_max_amount: 20000.00,
daily_max_load: 5,
};
let mut new_worker = Worker::new(limit);
new_worker.load_transactions(read_path);
new_worker.process();
new_worker.file_writer(write_path);
let duration = start.elapsed();
println!("duration total execution time: {:?}",duration);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment