Skip to content

Commit

Permalink
Remove correction factor of 8 for cache size
Browse files Browse the repository at this point in the history
QLever now reports the cache size in bytes, not number of IDs, as it
used to.
  • Loading branch information
Hannah Bast committed Oct 9, 2023
1 parent 6e3d54e commit 5c54107
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions qlever
Original file line number Diff line number Diff line change
Expand Up @@ -1001,16 +1001,11 @@ class Actions:
key_value_pairs = json.loads(raw_json).items()
max_key_len = max([len(key) for key, _ in key_value_pairs])
for key, value in key_value_pairs:
if re.search(r"pinned-size", key):
value *= 8
if isinstance(value, int) or re.match(r"^\d+$", value):
value = "{:,}".format(int(value))
if re.match(r"^\d+\.\d+$", value):
value = "{:.2f}".format(float(value))
log.info(f"{key.ljust(max_key_len)} : {value}")
log.info("NOTE: multiplying pinned sizes by 8 to get "
"bytes instead of number of IDs")
log.info("")
print_json_as_tabular(cache_stats)
log.info("")
print_json_as_tabular(cache_settings)
Expand Down

0 comments on commit 5c54107

Please sign in to comment.