Changeset 2931 in kBuild
- Timestamp:
- Sep 18, 2016 3:57:48 PM (9 years ago)
- Location:
- trunk/src/kmk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kmk/dir-nt-bird.c
r2912 r2931 413 413 414 414 415 /** 416 * Print statitstics. 417 */ 418 void print_dir_stats(void) 419 { 420 FILE *pOut = stdout; 421 KU32 cMisses; 422 423 fputs("\n" 424 "# NT dir cache stats:\n", pOut); 425 fprintf(pOut, "# %u objects, taking up %u (%#x) bytes, avg %u bytes\n", 426 g_pFsCache->cObjects, g_pFsCache->cbObjects, g_pFsCache->cbObjects, g_pFsCache->cbObjects / g_pFsCache->cObjects); 427 fprintf(pOut, "# %u A path hashes, taking up %u (%#x) bytes, avg %u bytes, %u collision\n", 428 g_pFsCache->cAnsiPaths, g_pFsCache->cbAnsiPaths, g_pFsCache->cbAnsiPaths, 429 g_pFsCache->cbAnsiPaths / K_MAX(g_pFsCache->cAnsiPaths, 1), g_pFsCache->cAnsiPathCollisions); 430 #ifdef KFSCACHE_CFG_UTF16 431 fprintf(pOut, "# %u W path hashes, taking up %u (%#x) bytes, avg %u bytes, %u collisions\n", 432 g_pFsCache->cUtf16Paths, g_pFsCache->cbUtf16Paths, g_pFsCache->cbUtf16Paths, 433 g_pFsCache->cbUtf16Paths / K_MAX(g_pFsCache->cUtf16Paths, 1), g_pFsCache->cUtf16PathCollisions); 434 #endif 435 fprintf(pOut, "# %u child hash tables, total of %u entries, %u children inserted, %u collisions\n", 436 g_pFsCache->cChildHashTabs, g_pFsCache->cChildHashEntriesTotal, 437 g_pFsCache->cChildHashed, g_pFsCache->cChildHashCollisions); 438 439 cMisses = g_pFsCache->cLookups - g_pFsCache->cPathHashHits - g_pFsCache->cWalkHits; 440 fprintf(pOut, "# %u lookups: %u (%" KU64_PRI " %%) path hash hits, %u (%" KU64_PRI "%%) walks hits, %u (%" KU64_PRI "%%) misses\n", 441 g_pFsCache->cLookups, 442 g_pFsCache->cPathHashHits, g_pFsCache->cPathHashHits * (KU64)100 / K_MAX(g_pFsCache->cLookups, 1), 443 g_pFsCache->cWalkHits, g_pFsCache->cWalkHits * (KU64)100 / K_MAX(g_pFsCache->cLookups, 1), 444 cMisses, cMisses * (KU64)100 / K_MAX(g_pFsCache->cLookups, 1)); 445 fprintf(pOut, "# %u child searches, %u (%" KU64_PRI "%%) hash hits\n", 446 g_pFsCache->cChildSearches, 447 g_pFsCache->cChildHashHits, g_pFsCache->cChildHashHits * (KU64)100 / K_MAX(g_pFsCache->cChildSearches, 1)); 448 } 449 450 415 451 void print_dir_data_base(void) 416 452 { 417 453 /** @todo. */ 454 418 455 } 419 456 -
trunk/src/kmk/dir.c
r2850 r2931 1340 1340 1341 1341 1342 #ifdef CONFIG_WITH_PRINT_STATS_SWITCH 1343 /* Print stats */ 1344 1345 void print_dir_stats (void) 1346 { 1347 /** @todo normal dir stats. */ 1348 } 1349 #endif 1350 1351 1342 1352 /* Hooks for globbing. */ 1343 1353 -
trunk/src/kmk/main.c
r2916 r2931 90 90 #ifdef CONFIG_WITH_PRINT_STATS_SWITCH 91 91 void print_variable_stats (void); 92 void print_dir_stats (void); 92 93 void print_file_stats (void); 93 94 #endif … … 3870 3871 print_variable_stats (); 3871 3872 print_file_stats (); 3873 print_dir_stats (); 3872 3874 # ifdef KMK 3873 3875 print_kbuild_define_stats ();
Note:
See TracChangeset
for help on using the changeset viewer.