Revert "speed_test: refactoring elapsed arg"
This reverts commit 12219b776cbab121887468687793853c01eefc57.
Vladimir Bauer
3 years ago
| 18 | 18 | unit: SizeB1024(0), |
| 19 | 19 | fmt: "", |
| 20 | 20 | current: 0, |
| 21 | elapsed: time.Duration(0), | |
| 21 | elapsed: time.Second, | |
| 22 | 22 | expected: "0 b/s", |
| 23 | 23 | }, |
| 24 | 24 | { |
| 26 | 26 | unit: SizeB1024(0), |
| 27 | 27 | fmt: "%d", |
| 28 | 28 | current: 0, |
| 29 | elapsed: time.Duration(0), | |
| 29 | elapsed: time.Second, | |
| 30 | 30 | expected: "0b/s", |
| 31 | 31 | }, |
| 32 | 32 | { |
| 42 | 42 | unit: SizeB1024(0), |
| 43 | 43 | fmt: "% .2f", |
| 44 | 44 | current: 0, |
| 45 | elapsed: time.Duration(0), | |
| 45 | elapsed: time.Second, | |
| 46 | 46 | expected: "0.00 b/s", |
| 47 | 47 | }, |
| 48 | 48 | { |
| 66 | 66 | unit: SizeB1024(0), |
| 67 | 67 | fmt: "%d", |
| 68 | 68 | current: 2 * int64(_iKiB), |
| 69 | elapsed: time.Second, | |
| 69 | elapsed: 1 * time.Second, | |
| 70 | 70 | expected: "2KiB/s", |
| 71 | 71 | }, |
| 72 | 72 | { |
| 74 | 74 | unit: SizeB1024(0), |
| 75 | 75 | fmt: "% .2f", |
| 76 | 76 | current: 2 * int64(_iKiB), |
| 77 | elapsed: time.Second, | |
| 77 | elapsed: 1 * time.Second, | |
| 78 | 78 | expected: "2.00 KiB/s", |
| 79 | 79 | }, |
| 80 | 80 | { |
| 82 | 82 | unit: SizeB1024(0), |
| 83 | 83 | fmt: "%d", |
| 84 | 84 | current: 2 * int64(_iMiB), |
| 85 | elapsed: time.Second, | |
| 85 | elapsed: 1 * time.Second, | |
| 86 | 86 | expected: "2MiB/s", |
| 87 | 87 | }, |
| 88 | 88 | { |
| 90 | 90 | unit: SizeB1024(0), |
| 91 | 91 | fmt: "% .2f", |
| 92 | 92 | current: 2 * int64(_iMiB), |
| 93 | elapsed: time.Second, | |
| 93 | elapsed: 1 * time.Second, | |
| 94 | 94 | expected: "2.00 MiB/s", |
| 95 | 95 | }, |
| 96 | 96 | { |
| 98 | 98 | unit: SizeB1024(0), |
| 99 | 99 | fmt: "%d", |
| 100 | 100 | current: 2 * int64(_iGiB), |
| 101 | elapsed: time.Second, | |
| 101 | elapsed: 1 * time.Second, | |
| 102 | 102 | expected: "2GiB/s", |
| 103 | 103 | }, |
| 104 | 104 | { |
| 106 | 106 | unit: SizeB1024(0), |
| 107 | 107 | fmt: "% .2f", |
| 108 | 108 | current: 2 * int64(_iGiB), |
| 109 | elapsed: time.Second, | |
| 109 | elapsed: 1 * time.Second, | |
| 110 | 110 | expected: "2.00 GiB/s", |
| 111 | 111 | }, |
| 112 | 112 | { |
| 114 | 114 | unit: SizeB1024(0), |
| 115 | 115 | fmt: "%d", |
| 116 | 116 | current: 2 * int64(_iTiB), |
| 117 | elapsed: time.Second, | |
| 117 | elapsed: 1 * time.Second, | |
| 118 | 118 | expected: "2TiB/s", |
| 119 | 119 | }, |
| 120 | 120 | { |
| 122 | 122 | unit: SizeB1024(0), |
| 123 | 123 | fmt: "% .2f", |
| 124 | 124 | current: 2 * int64(_iTiB), |
| 125 | elapsed: time.Second, | |
| 125 | elapsed: 1 * time.Second, | |
| 126 | 126 | expected: "2.00 TiB/s", |
| 127 | 127 | }, |
| 128 | 128 | } |
| 154 | 154 | unit: SizeB1000(0), |
| 155 | 155 | fmt: "", |
| 156 | 156 | current: 0, |
| 157 | elapsed: time.Duration(0), | |
| 157 | elapsed: time.Second, | |
| 158 | 158 | expected: "0 b/s", |
| 159 | 159 | }, |
| 160 | 160 | { |
| 162 | 162 | unit: SizeB1000(0), |
| 163 | 163 | fmt: "%d", |
| 164 | 164 | current: 0, |
| 165 | elapsed: time.Duration(0), | |
| 165 | elapsed: time.Second, | |
| 166 | 166 | expected: "0b/s", |
| 167 | 167 | }, |
| 168 | 168 | { |
| 178 | 178 | unit: SizeB1000(0), |
| 179 | 179 | fmt: "% .2f", |
| 180 | 180 | current: 0, |
| 181 | elapsed: time.Duration(0), | |
| 181 | elapsed: time.Second, | |
| 182 | 182 | expected: "0.00 b/s", |
| 183 | 183 | }, |
| 184 | 184 | { |
| 202 | 202 | unit: SizeB1000(0), |
| 203 | 203 | fmt: "%d", |
| 204 | 204 | current: 2 * int64(_KB), |
| 205 | elapsed: time.Second, | |
| 205 | elapsed: 1 * time.Second, | |
| 206 | 206 | expected: "2KB/s", |
| 207 | 207 | }, |
| 208 | 208 | { |
| 210 | 210 | unit: SizeB1000(0), |
| 211 | 211 | fmt: "% .2f", |
| 212 | 212 | current: 2 * int64(_KB), |
| 213 | elapsed: time.Second, | |
| 213 | elapsed: 1 * time.Second, | |
| 214 | 214 | expected: "2.00 KB/s", |
| 215 | 215 | }, |
| 216 | 216 | { |
| 218 | 218 | unit: SizeB1000(0), |
| 219 | 219 | fmt: "%d", |
| 220 | 220 | current: 2 * int64(_MB), |
| 221 | elapsed: time.Second, | |
| 221 | elapsed: 1 * time.Second, | |
| 222 | 222 | expected: "2MB/s", |
| 223 | 223 | }, |
| 224 | 224 | { |
| 226 | 226 | unit: SizeB1000(0), |
| 227 | 227 | fmt: "% .2f", |
| 228 | 228 | current: 2 * int64(_MB), |
| 229 | elapsed: time.Second, | |
| 229 | elapsed: 1 * time.Second, | |
| 230 | 230 | expected: "2.00 MB/s", |
| 231 | 231 | }, |
| 232 | 232 | { |
| 234 | 234 | unit: SizeB1000(0), |
| 235 | 235 | fmt: "%d", |
| 236 | 236 | current: 2 * int64(_GB), |
| 237 | elapsed: time.Second, | |
| 237 | elapsed: 1 * time.Second, | |
| 238 | 238 | expected: "2GB/s", |
| 239 | 239 | }, |
| 240 | 240 | { |
| 242 | 242 | unit: SizeB1000(0), |
| 243 | 243 | fmt: "% .2f", |
| 244 | 244 | current: 2 * int64(_GB), |
| 245 | elapsed: time.Second, | |
| 245 | elapsed: 1 * time.Second, | |
| 246 | 246 | expected: "2.00 GB/s", |
| 247 | 247 | }, |
| 248 | 248 | { |
| 250 | 250 | unit: SizeB1000(0), |
| 251 | 251 | fmt: "%d", |
| 252 | 252 | current: 2 * int64(_TB), |
| 253 | elapsed: time.Second, | |
| 253 | elapsed: 1 * time.Second, | |
| 254 | 254 | expected: "2TB/s", |
| 255 | 255 | }, |
| 256 | 256 | { |
| 258 | 258 | unit: SizeB1000(0), |
| 259 | 259 | fmt: "% .2f", |
| 260 | 260 | current: 2 * int64(_TB), |
| 261 | elapsed: time.Second, | |
| 261 | elapsed: 1 * time.Second, | |
| 262 | 262 | expected: "2.00 TB/s", |
| 263 | 263 | }, |
| 264 | 264 | } |