Skip to content

Commit

Permalink
Add segment size to stats
Browse files Browse the repository at this point in the history
  • Loading branch information
gvinciguerra committed Mar 28, 2024
1 parent 09883f2 commit f2988fc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions pygm/pygm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ template <typename K> class PGMWrapper : private pgm::PGMIndex<K, IGNORED_PARAME
stats["height"] = this->height();
stats["index size"] = this->size_in_bytes();
stats["data size"] = sizeof(K) * size() + sizeof(*this);
stats["segment size"] = sizeof(this->segments[0]);
stats["leaf segments"] = this->segments_count();
stats["segments counts"] = segments_counts;
return stats;
Expand Down
1 change: 1 addition & 0 deletions pygm/sortedcontainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ def stats(self):
* ``'data size'`` size of the elements in bytes
* ``'index size'`` size of the index in bytes
* ``'segment size'`` size of a segment in bytes
* ``'leaf segments'`` number of segments in the last level of the index
* ``'segments counts'`` number of segments in each level of the index
* ``'height'`` number of levels of the index
Expand Down

0 comments on commit f2988fc

Please sign in to comment.