MCPcopy Create free account
hub / github.com/SmingHub/Sming / speedTest

Function speedTest

samples/SDCard/app/application.cpp:198–231  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

196}
197
198bool 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
233bool sdInit()
234{

Callers 1

runTestFunction · 0.85

Calls 1

writeToFileFunction · 0.85

Tested by

no test coverage detected