From 5a3525a9ce47d7d14b7e4f9aa955dc1a16dc2e7c Mon Sep 17 00:00:00 2001 From: hal8174 Date: Sat, 16 Nov 2024 16:34:13 +0100 Subject: [PATCH] Add timing of complete program --- vertex_cover/src/main.rs | 2 ++ vertex_cover/vc0.out | 24 +++++++-------- vertex_cover/vc3.out | 8 ++--- vertex_cover/vc4.out | 38 +++++++++++------------ vertex_cover/vc6.out | 66 ++++++++++++++++++++-------------------- 5 files changed, 70 insertions(+), 68 deletions(-) diff --git a/vertex_cover/src/main.rs b/vertex_cover/src/main.rs index 42b2e7f..6bffc21 100644 --- a/vertex_cover/src/main.rs +++ b/vertex_cover/src/main.rs @@ -163,6 +163,7 @@ struct Args { } fn main() { + let total_start = std::time::Instant::now(); let args = Args::parse(); let graph = parse(args.filename); @@ -207,4 +208,5 @@ fn main() { println!("{}", n + 1); } } + eprintln!("Total time: {:?}", total_start.elapsed()); } diff --git a/vertex_cover/vc0.out b/vertex_cover/vc0.out index 3bcc763..3e82caf 100644 --- a/vertex_cover/vc0.out +++ b/vertex_cover/vc0.out @@ -1,31 +1,31 @@ 35 1 -2 3 +4 5 -7 +6 8 -11 -12 +9 +10 13 14 +15 +16 17 -18 -20 -21 22 -23 24 -27 +25 +28 29 +31 +32 33 -34 +35 36 -37 38 +39 40 41 -42 43 44 45 diff --git a/vertex_cover/vc3.out b/vertex_cover/vc3.out index bdc86e6..e3dfe62 100644 --- a/vertex_cover/vc3.out +++ b/vertex_cover/vc3.out @@ -13,7 +13,6 @@ 22 23 24 -25 26 30 32 @@ -24,6 +23,7 @@ 37 38 39 +40 41 42 43 @@ -34,9 +34,9 @@ 52 53 54 -55 56 58 +60 63 65 67 @@ -50,16 +50,16 @@ 81 82 83 +84 86 87 89 90 91 93 -94 95 97 -99 +98 101 104 105 diff --git a/vertex_cover/vc4.out b/vertex_cover/vc4.out index 9e91703..68943a3 100644 --- a/vertex_cover/vc4.out +++ b/vertex_cover/vc4.out @@ -5,44 +5,40 @@ 5 6 7 +8 9 10 -11 12 -13 +14 15 -17 18 19 20 21 22 -23 -24 25 26 -28 +27 29 30 31 -32 +33 34 -35 36 +38 39 40 41 -43 44 45 -46 47 -49 +48 +51 52 +53 54 55 56 -57 59 60 61 @@ -51,11 +47,14 @@ 65 66 67 +68 69 72 -73 +74 +75 76 -77 +78 +79 80 81 82 @@ -63,11 +62,12 @@ 84 85 86 -91 +87 +88 +89 +90 +92 93 +94 95 -96 -97 -98 -99 100 diff --git a/vertex_cover/vc6.out b/vertex_cover/vc6.out index 50c6dfa..d4d3d8b 100644 --- a/vertex_cover/vc6.out +++ b/vertex_cover/vc6.out @@ -1,17 +1,19 @@ 112 -1 +3 4 5 6 8 12 13 +14 15 +16 17 20 21 +22 23 -25 27 28 30 @@ -19,30 +21,34 @@ 32 33 35 -36 37 -38 +39 40 -43 +41 +42 +44 45 +49 50 51 52 -53 54 -58 -59 +55 +56 +57 60 +62 63 64 +65 66 +68 70 71 -72 73 74 75 -76 +77 78 79 80 @@ -51,63 +57,57 @@ 84 86 87 -90 +88 +89 +92 93 94 96 +97 98 100 -102 -103 +104 105 106 107 108 109 110 -111 -112 113 +114 115 -116 +118 119 -121 +120 122 123 124 125 +126 127 -128 -130 131 -133 -134 -136 +132 138 -139 -141 +142 143 144 +145 146 147 148 +149 150 -152 +151 153 -154 155 -156 157 +158 159 -160 -163 -164 -166 +162 168 169 -170 172 173 174 -175 176 +177