mirror of https://github.com/etcd-io/dbtester.git
control: remove value path
This commit is contained in:
parent
d33ae045b0
commit
2e2ff32516
|
|
@ -56,7 +56,6 @@ type Config struct {
|
|||
KeySize int `yaml:"key_size"`
|
||||
SameKey bool `yaml:"same_key"`
|
||||
ValueSize int `yaml:"value_size"`
|
||||
ValueTestDataPath string `yaml:"value_testdata_path"`
|
||||
TotalRequests int `yaml:"total_requests"`
|
||||
RequestIntervalMs int `yaml:"request_interval_ms"`
|
||||
Etcdv3CompactionCycle int `yaml:"etcdv3_compaction_cycle"`
|
||||
|
|
|
|||
|
|
@ -75,16 +75,13 @@ func TestReadConfig(t *testing.T) {
|
|||
if !c.Step2.SameKey {
|
||||
t.Fatalf("unexpected %v", c.Step2.SameKey)
|
||||
}
|
||||
if c.Step2.ValueTestDataPath != "/home/gyuho/testdata" {
|
||||
t.Fatalf("unexpected %s", c.Step2.ValueTestDataPath)
|
||||
}
|
||||
if c.Step2.Connections != 100 {
|
||||
t.Fatalf("unexpected %d", c.Step2.Connections)
|
||||
}
|
||||
if !c.Step2.StaleRead {
|
||||
t.Fatalf("unexpected %v", c.Step2.StaleRead)
|
||||
}
|
||||
if c.Step2.TotalRequests != 3000000 {
|
||||
if c.Step2.TotalRequests != 2000000 {
|
||||
t.Fatalf("unexpected %d", c.Step2.TotalRequests)
|
||||
}
|
||||
if c.Step2.RequestIntervalMs != 100 {
|
||||
|
|
|
|||
|
|
@ -122,28 +122,9 @@ type values struct {
|
|||
}
|
||||
|
||||
func newValues(cfg Config) (v values, rerr error) {
|
||||
if cfg.Step2.ValueTestDataPath == "" {
|
||||
v.bytes = [][]byte{randBytes(cfg.Step2.ValueSize)}
|
||||
v.strings = []string{string(v.bytes[0])}
|
||||
v.sampleSize = 1
|
||||
return
|
||||
}
|
||||
|
||||
fs, err := walkDir(cfg.Step2.ValueTestDataPath)
|
||||
if err != nil {
|
||||
rerr = err
|
||||
return
|
||||
}
|
||||
for _, elem := range fs {
|
||||
bts, err := ioutil.ReadFile(elem.path)
|
||||
if err != nil {
|
||||
rerr = err
|
||||
return
|
||||
}
|
||||
v.bytes = append(v.bytes, bts)
|
||||
v.strings = append(v.strings, string(bts))
|
||||
}
|
||||
v.sampleSize = len(v.strings)
|
||||
v.bytes = [][]byte{randBytes(cfg.Step2.ValueSize)}
|
||||
v.strings = []string{string(v.bytes[0])}
|
||||
v.sampleSize = 1
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -119,10 +119,8 @@ func (r *report) print() {
|
|||
r.printSecondSample()
|
||||
}
|
||||
|
||||
fmt.Println("ERROR COUNT:", len(r.errorDist))
|
||||
if len(r.errorDist) > 0 {
|
||||
r.printErrors()
|
||||
}
|
||||
fmt.Println("ERROR COUNT:", r.errorDist)
|
||||
plog.Println("ERROR COUNT:", r.errorDist)
|
||||
}
|
||||
|
||||
// Prints percentile latencies.
|
||||
|
|
|
|||
|
|
@ -31,8 +31,7 @@ step2:
|
|||
key_size: 8
|
||||
same_key: true
|
||||
value_size: 256
|
||||
value_testdata_path: /home/gyuho/testdata # overwrites value_size
|
||||
total_requests: 3000000
|
||||
total_requests: 2000000
|
||||
request_interval_ms: 100
|
||||
etcdv3_compaction_cycle: 100
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
hash: 26acb499dc911b1c79aaab06e7b527fb89f53517afb028c9f015ee4a58df9117
|
||||
updated: 2016-11-11T10:41:24.421490156-08:00
|
||||
hash: b1f90d1eb77f138a69cedeb0b6dda626db148473095afe5d3528ceaf388cd380
|
||||
updated: 2016-11-11T16:31:30.806036979-08:00
|
||||
imports:
|
||||
- name: bitbucket.org/ww/goautoneg
|
||||
version: 75cd24fc2f2c2a2088577d12123ddee5f54e0675
|
||||
|
|
@ -26,7 +26,7 @@ imports:
|
|||
- name: github.com/cheggaaa/pb
|
||||
version: 6e9d17711bb763b26b68b3931d47f24c1323abab
|
||||
- name: github.com/coreos/etcd
|
||||
version: 5af4de093077e37b8dc1f6e5fafcfb5954f2ad7e
|
||||
version: 45bba11f1229b1fa5931bae8dff09ad1166275c3
|
||||
subpackages:
|
||||
- auth/authpb
|
||||
- client
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import:
|
|||
- package: github.com/cheggaaa/pb
|
||||
version: 6e9d17711bb763b26b68b3931d47f24c1323abab
|
||||
- package: github.com/coreos/etcd
|
||||
version: 5af4de093077e37b8dc1f6e5fafcfb5954f2ad7e
|
||||
version: 45bba11f1229b1fa5931bae8dff09ad1166275c3
|
||||
subpackages:
|
||||
- auth/authpb
|
||||
- client
|
||||
|
|
|
|||
Loading…
Reference in New Issue