A* path and neighbor cache performance statistics
as_clear_cachepath() now prints cache hits, misses, number of entries, and memory use to stderr, when compiled with AS_STATS defined.
This commit is contained in:
parent
8f92fe40f4
commit
2797e58c20
2 changed files with 43 additions and 1 deletions
|
@ -120,6 +120,8 @@ best_path(struct sctstr *from, struct sctstr *to, char *path, int mob_type)
|
|||
|
||||
#ifdef AS_STATS
|
||||
as_stats(adp, stderr);
|
||||
fprintf(stderr, "neighbor cache %zu bytes\n",
|
||||
WORLD_SZ() * 6 * sizeof(struct sctstr *));
|
||||
#endif /* AS_STATS */
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue