mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
size_t, because %zi/%u is not supported on all platforms.
This commit is contained in:
parent
529ea5d184
commit
293f3f526d
2 changed files with 26 additions and 13 deletions
|
@ -233,11 +233,12 @@ _Py_hashtable_print_stats(_Py_hashtable_t *ht)
|
|||
nchains++;
|
||||
}
|
||||
}
|
||||
printf("hash table %p: entries=%zu/%zu (%.0f%%), ",
|
||||
printf("hash table %p: entries=%"
|
||||
PY_FORMAT_SIZE_T "u/%" PY_FORMAT_SIZE_T "u (%.0f%%), ",
|
||||
ht, ht->entries, ht->num_buckets, load * 100.0);
|
||||
if (nchains)
|
||||
printf("avg_chain_len=%.1f, ", (double)total_chain_len / nchains);
|
||||
printf("max_chain_len=%zu, %zu kB\n",
|
||||
printf("max_chain_len=%" PY_FORMAT_SIZE_T "u, %" PY_FORMAT_SIZE_T "u kB\n",
|
||||
max_chain_len, size / 1024);
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue