workload/tpcc: make uuid generation deterministic#37515
Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom May 15, 2019
Merged
workload/tpcc: make uuid generation deterministic#37515craig[bot] merged 1 commit intocockroachdb:masterfrom
craig[bot] merged 1 commit intocockroachdb:masterfrom
Conversation
Also reduce allocations. Bonus: history table rows are now generated in
primary key order, which the new direct ingestion IMPORT in 19.2 will
take advantage of.
name old time/op new time/op delta
InitialData/tpcc/warehouses=1-8 385ms ± 1% 355ms ± 0% -7.80% (p=0.008 n=5+5)
name old speed new speed delta
InitialData/tpcc/warehouses=1-8 286MB/s ± 1% 310MB/s ± 0% +8.45% (p=0.008 n=5+5)
name old alloc/op new alloc/op delta
InitialData/tpcc/warehouses=1-8 914kB ± 0% 194kB ± 0% -78.76% (p=0.008 n=5+5)
name old allocs/op new allocs/op delta
InitialData/tpcc/warehouses=1-8 60.6k ± 0% 0.6k ± 0% -99.02% (p=0.008 n=5+5)
Release note: None
Member
nvb
approved these changes
May 15, 2019
Contributor
nvb
left a comment
There was a problem hiding this comment.
Reviewable status:
complete! 1 of 0 LGTMs obtained (waiting on @danhhz and @nvanbenschoten)
pkg/workload/tpcc/generate.go, line 61 at r1 (raw file):
middleName = []byte(`OE`) goodCredit = []byte("GC") badCredit = []byte("BC")
We can remove the cast where these are used now, right?
pkg/workload/tpcc/generate.go, line 436 at r1 (raw file):
Quoted 4 lines of code…
// Then, because this involves some floats (and // who knows what kind of crazy rounding things can happen when floats are // involved), we make sure they're unique by sticking the original row index // in the lower 8 bytes.
Good idea!
danhhz
commented
May 15, 2019
Contributor
Author
danhhz
left a comment
There was a problem hiding this comment.
TFTR!
bors r=nvanbenschoten
Reviewable status:
complete! 1 of 0 LGTMs obtained (waiting on @danhhz and @nvanbenschoten)
pkg/workload/tpcc/generate.go, line 61 at r1 (raw file):
Previously, nvanbenschoten (Nathan VanBenschoten) wrote…
We can remove the cast where these are used now, right?
already done. one of the two was being conditionally assigned to the credit variable, which lost its cast
craig bot
pushed a commit
that referenced
this pull request
May 15, 2019
37515: workload/tpcc: make uuid generation deterministic r=nvanbenschoten a=danhhz
Also reduce allocations. Bonus: history table rows are now generated in
primary key order, which the new direct ingestion IMPORT in 19.2 will
take advantage of.
name old time/op new time/op delta
InitialData/tpcc/warehouses=1-8 385ms ± 1% 355ms ± 0% -7.80% (p=0.008 n=5+5)
name old speed new speed delta
InitialData/tpcc/warehouses=1-8 286MB/s ± 1% 310MB/s ± 0% +8.45% (p=0.008 n=5+5)
name old alloc/op new alloc/op delta
InitialData/tpcc/warehouses=1-8 914kB ± 0% 194kB ± 0% -78.76% (p=0.008 n=5+5)
name old allocs/op new allocs/op delta
InitialData/tpcc/warehouses=1-8 60.6k ± 0% 0.6k ± 0% -99.02% (p=0.008 n=5+5)
Release note: None
Co-authored-by: Daniel Harrison <daniel.harrison@gmail.com>
Contributor
Build succeeded |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Also reduce allocations. Bonus: history table rows are now generated in
primary key order, which the new direct ingestion IMPORT in 19.2 will
take advantage of.
Release note: None