add zero padding, insert order, and time stamp in text#50546
add zero padding, insert order, and time stamp in text#50546craig[bot] merged 1 commit intomasterfrom
Conversation
|
@robert-s-lee could you describe the motivation here? It looks like some, but not all, of these flags are coming from the official YCSB. Is the idea to make this version more feature-complete? |
|
The idea is not to make it more feature-complete. We use YCSB for demos of the locality and these fill the gap. |
nvb
left a comment
There was a problem hiding this comment.
but you'll need to rebase first. Thanks for doing this.
Reviewed 1 of 1 files at r1, 1 of 1 files at r2.
Reviewable status:complete! 1 of 0 LGTMs obtained (waiting on @robert-s-lee)
pkg/workload/ycsb/ycsb.go, line 616 at r1 (raw file):
strStart := 0 if yw.config.timeString { loc, _ := time.LoadLocation(timeZoneDefault)
You can replace these two lines with curTime := time.Now().UTC()
pkg/workload/ycsb/ycsb.go, line 618 at r1 (raw file):
loc, _ := time.LoadLocation(timeZoneDefault) currentTime := time.Now().In(loc) copy(str, currentTime.Format(timeFormatTemplate))
We can avoid the intermediate allocation and the timeFormatLen const with:
str = curTime.AppendFormat(str[:0], timeFormatTemplate)
strStart = len(str)
str = str[:length]
|
Something went amiss with the rebase. |
4ce31f0 to
0b5a75e
Compare
--insert-hash=true creates user1, user2 for ycsb_key --zero-padding=2 creates user01, user02 for ycsb_key --time-string=true creates field[0-9] with example `2020-06-23 13:23:58.529711+00:00DwYFKxzTOKqgYwdHZNmbzdkRfINphVojmwiDbhaFsEnFHRpxSJQdSRnXOrQbjJhjYzko` instead of `rmArXhKIjbpTAPwyjDNsmkGTLXWNQHQCLAyKwWFOrlopXliOKqQANpakAxsmqfPzYSvAhgYYVQQDhUEuXCVuvsEdJrrguNSaXDbx` Closes #50545 and #50544 Release note (general change): added new options to YCSB that mirrors OpenSource YCSB options merge PR 50475 Merge changes from PR #50475 which populates the fields[0-9] during the init
5be15ae to
ca700c9
Compare
|
bors r+ |
Build succeeded |
--insert-hash=truecreatesuser1,user2forycsb_key--zero-padding=2createsuser01,user02forycsb_key--time-string=truecreatesfield[0-9]withinstead of
Closes #50545 and #50544