Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix HashTable::toString() #7921

Closed

Conversation

mbasmanova
Copy link
Contributor

@mbasmanova mbasmanova commented Dec 7, 2023

HashTable::toString() used to show incorrect total number of occupied slots.

Sample output:


[HashTable keys: 1 hash mode: HASH capacity: 2048 distinct count: 1000 tombstones count: 0]
<VectorHasher type=BIGINT  isRange_=0 rangeSize= 1 min=0 max=0 multiplier=1 numDistinct=0>
0 probes 1000 tag loads 512 row loads 500 hits
Total buckets: 128
Total slots used: 500
8 buckets with 1 slots used
21 buckets with 2 slots used
25 buckets with 3 slots used
27 buckets with 4 slots used
18 buckets with 5 slots used
12 buckets with 6 slots used
10 buckets with 7 slots used
2 buckets with 8 slots used
1 buckets with 9 slots used
1 buckets with 10 slots used

Also, add toString(startBucket, numBuckets) API to print details for a range of
buckets. For each bucket, prints 16 tags: a value, E if empty, T if tombstone.

For example, toString(31, 5):

  31: 194, 208, 249, 224,   E,   E,   E,   E,   E,   E,   E,   E,   E,   E,   E,   E
  32: 130, 249, 134, 129, 136, 161, 134,   E,   E,   E,   E,   E,   E,   E,   E,   E
  33: 227, 208, 245, 147, 182,   E,   E,   E,   E,   E,   E,   E,   E,   E,   E,   E
  34: 180, 193,   E,   E,   E,   E,   E,   E,   E,   E,   E,   E,   E,   E,   E,   E
  35: 246, 134, 241,   E,   E,   E,   E,   E,   E,   E,   E,   E,   E,   E,   E,   E

@mbasmanova mbasmanova requested a review from xiaoxmeng December 7, 2023 22:56
Copy link

netlify bot commented Dec 7, 2023

Deploy Preview for meta-velox canceled.

Name Link
🔨 Latest commit 35e4377
🔍 Latest deploy log https://app.netlify.com/sites/meta-velox/deploys/65726052ef78000008759215

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Dec 7, 2023
@mbasmanova mbasmanova force-pushed the fix-hash-table-to-string branch from 6729921 to 5cf7470 Compare December 7, 2023 23:00
@facebook-github-bot
Copy link
Contributor

@mbasmanova has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@mbasmanova mbasmanova force-pushed the fix-hash-table-to-string branch from 5cf7470 to 9d59b78 Compare December 7, 2023 23:02
@facebook-github-bot
Copy link
Contributor

@mbasmanova has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@mbasmanova mbasmanova force-pushed the fix-hash-table-to-string branch from 9d59b78 to dd392eb Compare December 7, 2023 23:53
@facebook-github-bot
Copy link
Contributor

@mbasmanova has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@mbasmanova mbasmanova force-pushed the fix-hash-table-to-string branch from dd392eb to f5db432 Compare December 7, 2023 23:56
@facebook-github-bot
Copy link
Contributor

@mbasmanova has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

Copy link
Contributor

@xiaoxmeng xiaoxmeng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mbasmanova thanks!

@mbasmanova mbasmanova force-pushed the fix-hash-table-to-string branch from f5db432 to 35e4377 Compare December 8, 2023 00:16
@facebook-github-bot
Copy link
Contributor

@mbasmanova has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@mbasmanova merged this pull request in 8d97086.

Copy link

Conbench analyzed the 1 benchmark run on commit 8d97086c.

There were 4 benchmark results indicating a performance regression:

The full Conbench report has more details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants