void _teardown() { printf(" free blocks : %i of %i\n", (FS)->free_blocks, (FS)->block_count); printf(" pages allocated : %i\n", (FS)->stats_p_allocated); printf(" pages deleted : %i\n", (FS)->stats_p_deleted); #if SPIFFS_GC_STATS printf(" gc runs : %i\n", (FS)->stats_gc_runs); #endif #if SPIFFS_CACHE #if SPIFFS_CACHE_STATS chits_tot += (FS)->cache_hits; cmiss_tot += (FS)->cache_misses; printf(" cache hits : %i (sum %i)\n", (FS)->cache_hits, chits_tot); printf(" cache misses : %i (sum %i)\n", (FS)->cache_misses, cmiss_tot); printf(" cache utiliz : %f\n", ((float)chits_tot/(float)(chits_tot + cmiss_tot))); chits_tot = 0; cmiss_tot = 0; #endif #endif dump_flash_access_stats(); clear_flash_ops_log(); #if SPIFFS_GC_STATS if ((FS)->stats_gc_runs > 0) #endif dump_erase_counts(FS); printf(" fs consistency check:\n"); SPIFFS_check(FS); clear_test_path(); //hexdump_mem(&AREA(SPIFFS_PHYS_ADDR - 16), 32); //hexdump_mem(&AREA(SPIFFS_PHYS_ADDR + SPIFFS_FLASH_SIZE - 16), 32); }
void _teardown() { printf(" free blocks : %i of %i\n", (FS)->free_blocks, (FS)->block_count); printf(" pages allocated : %i\n", (FS)->stats_p_allocated); printf(" pages deleted : %i\n", (FS)->stats_p_deleted); #if SPIFFS_GC_STATS printf(" gc runs : %i\n", (FS)->stats_gc_runs); #endif #if SPIFFS_CACHE #if SPIFFS_CACHE_STATS chits_tot += (FS)->cache_hits; cmiss_tot += (FS)->cache_misses; printf(" cache hits : %i (sum %i)\n", (FS)->cache_hits, chits_tot); printf(" cache misses : %i (sum %i)\n", (FS)->cache_misses, cmiss_tot); printf(" cache utiliz : %f\n", ((float)chits_tot/(float)(chits_tot + cmiss_tot))); chits_tot = 0; cmiss_tot = 0; #endif #endif if (_area) { dump_flash_access_stats(); clear_flash_ops_log(); #if SPIFFS_GC_STATS if ((FS)->stats_gc_runs > 0) #endif dump_erase_counts(FS); printf(" fs consistency check output begin\n"); SPIFFS_check(FS); printf(" fs consistency check output end\n"); } clear_test_path(); fs_free(); printf(" locks : %i\n", _fs_locks); if (_fs_locks != 0) { printf("FATAL: lock asymmetry. Abort.\n"); exit(-1); } }