Alexei Podtelezhnikov pushed to branch master at FreeType / FreeType Demo Programs
Commits:
-
e6040f12
by Alexei Podtelezhnikov at 2021-06-04T22:26:37-04:00
2 changed files:
Changes:
1 |
+2021-06-04 Alexei Podtelezhnikov <apodtele@gmail.com>
|
|
2 |
+ |
|
3 |
+ * graph/gblender.c (gblender_dump_stats): Fix the lookup rate.
|
|
4 |
+ |
|
1 | 5 |
2021-06-02 Alexei Podtelezhnikov <apodtele@gmail.com>
|
2 | 6 |
|
3 | 7 |
* graph/grdevice.c (grDoneSurface) [GBLENDER_STATS]: Report stats.
|
... | ... | @@ -413,17 +413,17 @@ GBLENDER_APIDEF( void ) |
413 | 413 |
gblender_dump_stats( GBlender blender )
|
414 | 414 |
{
|
415 | 415 |
printf( "GBlender cache statistics:\n" );
|
416 |
- printf( " Hit rate: %.2f ( %ld out of %ld )\n",
|
|
416 |
+ printf( " Hit rate: %.2f%% ( %ld out of %ld )\n",
|
|
417 | 417 |
100.0f * blender->stat_hits /
|
418 | 418 |
( blender->stat_hits + blender->stat_lookups ),
|
419 | 419 |
blender->stat_hits,
|
420 | 420 |
blender->stat_hits + blender->stat_lookups );
|
421 | 421 |
|
422 |
- printf( " Lookup rate: %.2f ( %ld out of %ld )\n",
|
|
423 |
- 100.0f * blender->stat_lookups /
|
|
424 |
- ( blender->stat_lookups + blender->stat_keys ),
|
|
425 |
- blender->stat_lookups,
|
|
426 |
- blender->stat_keys + blender->stat_lookups );
|
|
422 |
+ printf( " Lookup rate: %.2f%% ( %ld out of %ld )\n",
|
|
423 |
+ 100.0f * ( blender->stat_lookups - blender->stat_keys ) /
|
|
424 |
+ blender->stat_lookups,
|
|
425 |
+ blender->stat_lookups - blender->stat_keys,
|
|
426 |
+ blender->stat_lookups );
|
|
427 | 427 |
printf( " Keys used: %ld\n Caches full: %ld\n",
|
428 | 428 |
blender->stat_keys, blender->stat_clears );
|
429 | 429 |
}
|