Crates.io | print_each_line |
lib.rs | print_each_line |
version | 0.1.0 |
source | src |
created_at | 2022-05-12 12:01:58.958726 |
updated_at | 2022-05-12 12:01:58.958726 |
description | It prints each line and execution time during execution. You can utilize it as a super simple profiler. |
homepage | |
repository | https://github.com/europeanplaice/print_each_line |
max_upload_size | |
id | 585181 |
size | 84,945 |
It prints each line and execution time during execution. It can be used as a super simple profiler.
use print_each_line::printline;
use dpss::dp;
use std::thread::sleep;
use std::time::{Duration};
#[printline]
fn main() {
let arr = vec![-2445617,1415464,-1234475,-8719641,4811893];
let result = dp::find_subset(arr, -3907748, 100);
sleep(Duration::from_millis(1234));
let route1: Vec<i32> = vec![-8719641, 4811893];
let answer: Vec<Vec<i32>> = vec![route1];
assert_eq!(result, answer);
}
Output
Ran ... 📄 let arr = vec ! [- 2445617, 1415464, - 1234475, - 8719641, 4811893] 📄 ... ⌛ (Elapsed 0 milliseconds) ⌛
Ran ... 📄 let result = dp :: find_subset (arr, - 3907748, 100) 📄 ... ⌛ (Elapsed 325 milliseconds) ⌛
Ran ... 📄 sleep (Duration :: from_millis(1234)) 📄 ... ⌛ (Elapsed 1236 milliseconds) ⌛
Ran ... 📄 let route1 : Vec < i32 > = vec ! [- 8719641, 4811893] 📄 ... ⌛ (Elapsed 0 milliseconds) ⌛
Ran ... 📄 let answer : Vec < Vec < i32 >> = vec ! [route1] 📄 ... ⌛ (Elapsed 0 milliseconds) ⌛
Ran ... 📄 assert_eq ! (result, answer) 📄 ... ⌛ (Elapsed 0 milliseconds) ⌛