diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2021-10-11 19:26:28 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2021-10-11 20:14:18 +0200 |
commit | dfe446c63abf151b54ab1c9c371788078eda6912 (patch) | |
tree | 3bef2d9b818f57846823d6c79b0543fdb7b4c1e9 /src/executor.rs | |
parent | dbafe13b0d5142acf7f8f30cb76c8adc5c179ce8 (diff) | |
download | rebel-dfe446c63abf151b54ab1c9c371788078eda6912.tar rebel-dfe446c63abf151b54ab1c9c371788078eda6912.zip |
executor: sort and reformat summary output
Diffstat (limited to 'src/executor.rs')
-rw-r--r-- | src/executor.rs | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/src/executor.rs b/src/executor.rs index ec39d73..54543f3 100644 --- a/src/executor.rs +++ b/src/executor.rs @@ -355,12 +355,23 @@ impl<'ctx> Executor<'ctx> { assert!(self.tasks_blocked.is_empty(), "No runnable tasks left"); - println!("Summary"); - for (task_ref, task) in &self.tasks_done { + println!(); + println!("Summary:"); + + let mut tasks: Box<[_]> = self.tasks_done.iter().collect(); + tasks.sort_by_cached_key(|(task, _)| format!("{:#}", task)); + for (task_ref, task) in tasks.iter() { println!(); - println!("{} ( {} )", task_ref, task.input_hash); - for (output, hash) in &task.output.outputs { - println!("-> {} ( {} )", output, hash); + println!("{:#}", task_ref); + println!(" input: {}", task.input_hash); + if let Some(hash) = task.output.layer { + println!(" layer: {}", hash); + } + if !task.output.outputs.is_empty() { + println!(" outputs:"); + for (output, hash) in &task.output.outputs { + println!(" {}: {}", output, hash); + } } } Ok(()) |