Merge pull request #296 from gyuho/max-cpu

*: add 'MAX-CPU'
This commit is contained in:
Gyu-Ho Lee 2017-02-13 16:59:16 -08:00 committed by GitHub
commit a68ae5e97c
6 changed files with 57 additions and 0 deletions

View File

@ -124,6 +124,7 @@ func (data *analyzeData) aggregateAll(memoryByKeyPath string, readBytesDeltaByKe
avgVolCtxSwitchCol = dataframe.NewColumn("AVG-VOLUNTARY-CTXT-SWITCHES") // from VOLUNTARY-CTXT-SWITCHES
avgNonVolCtxSwitchCol = dataframe.NewColumn("AVG-NON-VOLUNTARY-CTXT-SWITCHES") // from NON-VOLUNTARY-CTXT-SWITCHES
avgCPUCol = dataframe.NewColumn("AVG-CPU") // from CPU-NUM
maxCPUCol = dataframe.NewColumn("MAX-CPU") // from CPU-NUM
avgSystemLoadCol = dataframe.NewColumn("AVG-SYSTEM-LOAD-1-MIN") // from LOAD-AVERAGE-1-MINUTE
avgVMRSSMBCol = dataframe.NewColumn("AVG-VMRSS-MB") // from VMRSS-NUM
avgReadsCompletedCol = dataframe.NewColumn("AVG-READS-COMPLETED") // from READS-COMPLETED
@ -153,6 +154,7 @@ func (data *analyzeData) aggregateAll(memoryByKeyPath string, readBytesDeltaByKe
volCtxSwitchSum float64
nonVolCtxSwitchSum float64
cpuSum float64
cpuMax float64
loadAvgSum float64
vmrssMBSum float64
readsCompletedSum float64
@ -197,6 +199,9 @@ func (data *analyzeData) aggregateAll(memoryByKeyPath string, readBytesDeltaByKe
nonVolCtxSwitchSum += vv
case strings.HasPrefix(hd, "CPU-"): // CPU-NUM was converted to CPU-1, CPU-2, CPU-3
cpuSum += vv
if cpuMax == 0.0 || cpuMax < vv {
cpuMax = vv
}
case strings.HasPrefix(hd, "LOAD-AVERAGE-1-"): // LOAD-AVERAGE-1-MINUTE
loadAvgSum += vv
case strings.HasPrefix(hd, "VMRSS-MB-"): // VMRSS-NUM-NUM was converted to VMRSS-MB-1, VMRSS-MB-2, VMRSS-MB-3
@ -254,6 +259,7 @@ func (data *analyzeData) aggregateAll(memoryByKeyPath string, readBytesDeltaByKe
avgVolCtxSwitchCol.PushBack(dataframe.NewStringValue(fmt.Sprintf("%.2f", volCtxSwitchSum/sampleSize)))
avgNonVolCtxSwitchCol.PushBack(dataframe.NewStringValue(fmt.Sprintf("%.2f", nonVolCtxSwitchSum/sampleSize)))
avgCPUCol.PushBack(dataframe.NewStringValue(fmt.Sprintf("%.2f", cpuSum/sampleSize)))
maxCPUCol.PushBack(dataframe.NewStringValue(fmt.Sprintf("%.2f", cpuMax)))
avgSystemLoadCol.PushBack(dataframe.NewStringValue(fmt.Sprintf("%.2f", loadAvgSum/sampleSize)))
avgVMRSSMBCol.PushBack(dataframe.NewStringValue(fmt.Sprintf("%.2f", vmrssMBSum/sampleSize)))
avgReadsCompletedCol.PushBack(dataframe.NewStringValue(fmt.Sprintf("%.2f", readsCompletedSum/sampleSize)))
@ -288,6 +294,9 @@ func (data *analyzeData) aggregateAll(memoryByKeyPath string, readBytesDeltaByKe
if err = data.aggregated.AddColumn(avgCPUCol); err != nil {
return err
}
if err = data.aggregated.AddColumn(maxCPUCol); err != nil {
return err
}
if err = data.aggregated.AddColumn(avgSystemLoadCol); err != nil {
return err
}
@ -373,6 +382,7 @@ func (data *analyzeData) aggregateAll(memoryByKeyPath string, readBytesDeltaByKe
reorder := []string{
"CUMULATIVE-THROUGHPUT",
"AVG-CPU",
"MAX-CPU",
"AVG-SYSTEM-LOAD-1-MIN",
"AVG-VMRSS-MB",
"AVG-WRITES-COMPLETED",

View File

@ -284,6 +284,16 @@ func TestConfig(t *testing.T) {
"2017Q1-00-etcd-zookeeper-consul/01-write-1M-keys-client-variable/AVG-CPU.png",
},
},
{
Column: "MAX-CPU",
XAxis: "Second",
YAxis: "CPU(%)",
OutputPathCSV: "2017Q1-00-etcd-zookeeper-consul/01-write-1M-keys-client-variable/MAX-CPU.csv",
OutputPathList: []string{
"2017Q1-00-etcd-zookeeper-consul/01-write-1M-keys-client-variable/MAX-CPU.svg",
"2017Q1-00-etcd-zookeeper-consul/01-write-1M-keys-client-variable/MAX-CPU.png",
},
},
{
Column: "AVG-VMRSS-MB",
XAxis: "Second",
@ -414,6 +424,11 @@ func TestConfig(t *testing.T) {
Path: "https://storage.googleapis.com/dbtester-results/2017Q1-00-etcd-zookeeper-consul/01-write-1M-keys-client-variable/AVG-CPU.svg",
Type: "remote",
},
{
Title: "2017Q1-00-etcd-zookeeper-consul/01-write-1M-keys-client-variable/MAX-CPU",
Path: "https://storage.googleapis.com/dbtester-results/2017Q1-00-etcd-zookeeper-consul/01-write-1M-keys-client-variable/MAX-CPU.svg",
Type: "remote",
},
{
Title: "2017Q1-00-etcd-zookeeper-consul/01-write-1M-keys-client-variable/AVG-VMRSS-MB",
Path: "https://storage.googleapis.com/dbtester-results/2017Q1-00-etcd-zookeeper-consul/01-write-1M-keys-client-variable/AVG-VMRSS-MB.svg",

View File

@ -249,6 +249,10 @@ plot_list:
x_axis: Second
y_axis: CPU(%)
- column: MAX-CPU
x_axis: Second
y_axis: CPU(%)
- column: AVG-VMRSS-MB
x_axis: Second
y_axis: Memory(MB)
@ -317,6 +321,10 @@ readme:
path: https://storage.googleapis.com/dbtester-results/2017Q1-00-etcd-zookeeper-consul/01-write-1M-keys-client-variable/AVG-CPU.svg
type: remote
- title: 2017Q1-00-etcd-zookeeper-consul/01-write-1M-keys-client-variable/MAX-CPU
path: https://storage.googleapis.com/dbtester-results/2017Q1-00-etcd-zookeeper-consul/01-write-1M-keys-client-variable/MAX-CPU.svg
type: remote
- title: 2017Q1-00-etcd-zookeeper-consul/01-write-1M-keys-client-variable/AVG-VMRSS-MB
path: https://storage.googleapis.com/dbtester-results/2017Q1-00-etcd-zookeeper-consul/01-write-1M-keys-client-variable/AVG-VMRSS-MB.svg
type: remote

View File

@ -248,6 +248,10 @@ plot_list:
x_axis: Second
y_axis: CPU(%)
- column: MAX-CPU
x_axis: Second
y_axis: CPU(%)
- column: AVG-VMRSS-MB
x_axis: Second
y_axis: Memory(MB)
@ -316,6 +320,10 @@ readme:
path: https://storage.googleapis.com/dbtester-results/2017Q1-00-etcd-zookeeper-consul/01-write-1M-keys-client-variable/AVG-CPU.svg
type: remote
- title: 2017Q1-00-etcd-zookeeper-consul/01-write-1M-keys-client-variable/MAX-CPU
path: https://storage.googleapis.com/dbtester-results/2017Q1-00-etcd-zookeeper-consul/01-write-1M-keys-client-variable/MAX-CPU.svg
type: remote
- title: 2017Q1-00-etcd-zookeeper-consul/01-write-1M-keys-client-variable/AVG-VMRSS-MB
path: https://storage.googleapis.com/dbtester-results/2017Q1-00-etcd-zookeeper-consul/01-write-1M-keys-client-variable/AVG-VMRSS-MB.svg
type: remote

View File

@ -242,6 +242,10 @@ plot_list:
x_axis: Second
y_axis: CPU(%)
- column: MAX-CPU
x_axis: Second
y_axis: CPU(%)
- column: AVG-VMRSS-MB
x_axis: Second
y_axis: Memory(MB)
@ -310,6 +314,10 @@ readme:
path: https://storage.googleapis.com/dbtester-results/2017Q1-00-etcd-zookeeper-consul/02-write-1M-keys-best-throughput/AVG-CPU.svg
type: remote
- title: 2017Q1-00-etcd-zookeeper-consul/02-write-1M-keys-best-throughput/MAX-CPU
path: https://storage.googleapis.com/dbtester-results/2017Q1-00-etcd-zookeeper-consul/02-write-1M-keys-best-throughput/MAX-CPU.svg
type: remote
- title: 2017Q1-00-etcd-zookeeper-consul/02-write-1M-keys-best-throughput/AVG-VMRSS-MB
path: https://storage.googleapis.com/dbtester-results/2017Q1-00-etcd-zookeeper-consul/02-write-1M-keys-best-throughput/AVG-VMRSS-MB.svg
type: remote

View File

@ -242,6 +242,10 @@ plot_list:
x_axis: Second
y_axis: CPU(%)
- column: MAX-CPU
x_axis: Second
y_axis: CPU(%)
- column: AVG-VMRSS-MB
x_axis: Second
y_axis: Memory(MB)
@ -310,6 +314,10 @@ readme:
path: https://storage.googleapis.com/dbtester-results/2017Q1-00-etcd-zookeeper-consul/03-write-too-many-keys/AVG-CPU.svg
type: remote
- title: 2017Q1-00-etcd-zookeeper-consul/03-write-too-many-keys/MAX-CPU
path: https://storage.googleapis.com/dbtester-results/2017Q1-00-etcd-zookeeper-consul/03-write-too-many-keys/MAX-CPU.svg
type: remote
- title: 2017Q1-00-etcd-zookeeper-consul/03-write-too-many-keys/AVG-VMRSS-MB
path: https://storage.googleapis.com/dbtester-results/2017Q1-00-etcd-zookeeper-consul/03-write-too-many-keys/AVG-VMRSS-MB.svg
type: remote