| 196 | } |
| 197 | |
| 198 | bool speedTest(unsigned num) |
| 199 | { |
| 200 | struct Test { |
| 201 | uint32_t totalBytes; |
| 202 | uint32_t bytesPerRound; |
| 203 | }; |
| 204 | |
| 205 | static const Test tests[] PROGMEM{ |
| 206 | {1024, 1}, // |
| 207 | {1024, 64}, // |
| 208 | {1024, 128}, // |
| 209 | {1024, 512}, // |
| 210 | {1024, 1024}, // |
| 211 | {4096, 1024}, // |
| 212 | {8192, 512}, // |
| 213 | {8192, 1024}, // |
| 214 | {8192, 8192}, // |
| 215 | |
| 216 | }; |
| 217 | |
| 218 | if(num >= ARRAY_SIZE(tests)) { |
| 219 | return false; |
| 220 | } |
| 221 | |
| 222 | Serial << "4." << num + 1 << _F(": Write speed benchmark") << endl; |
| 223 | |
| 224 | auto& test = tests[num]; |
| 225 | String filename; |
| 226 | filename = 'f'; |
| 227 | filename += num + 1; |
| 228 | filename += ".txt"; |
| 229 | writeToFile(filename, test.totalBytes, test.bytesPerRound); |
| 230 | return true; |
| 231 | } |
| 232 | |
| 233 | bool sdInit() |
| 234 | { |
no test coverage detected