Skip to content
Snippets Groups Projects
Commit 16b0c98f authored by Blinningjr's avatar Blinningjr
Browse files

Moved the creatino of task to a function

parent b5792f5c
No related branches found
No related tags found
No related merge requests found
......@@ -6,6 +6,21 @@ use srp_analyser::*;
fn main() {
let tasks: Tasks = create_tasks();
println!("tasks {:?}", &tasks);
println!("tot_util {}", total_load_factor(&tasks));
let (ip, tr) = pre_analysis(&tasks);
println!("ip: {:?}", ip);
println!("tr: {:?}", tr);
let analysis = analyse(&tasks, &ip, &tr, true);
println!("Analysis {:#?}", analysis);
}
fn create_tasks() -> Tasks {
let t1 = Task {
id: "T1".to_string(),
prio: 1,
......@@ -70,16 +85,6 @@ fn main() {
// builds a vector of tasks t1, t2, t3
let tasks: Tasks = vec![t1, t2, t3];
println!("tasks {:?}", &tasks);
println!("tot_util {}", total_load_factor(&tasks));
let (ip, tr) = pre_analysis(&tasks);
println!("ip: {:?}", ip);
println!("tr: {:?}", tr);
let analysis = analyse(&tasks, &ip, &tr, true);
println!("Analysis {:#?}", analysis);
return tasks;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment