aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/type/GenericIO.class.php
diff options
context:
space:
mode:
Diffstat (limited to 'type/GenericIO.class.php')
-rw-r--r--type/GenericIO.class.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/type/GenericIO.class.php b/type/GenericIO.class.php
index a0a9666..3a29948 100644
--- a/type/GenericIO.class.php
+++ b/type/GenericIO.class.php
@@ -35,6 +35,8 @@ class Type_GenericIO extends Type_Base {
35 $rrdgraph[] = sprintf('VDEF:tot_%1$s=avg_%1$s,TOTAL', crc32hex($sources[$i])); 35 $rrdgraph[] = sprintf('VDEF:tot_%1$s=avg_%1$s,TOTAL', crc32hex($sources[$i]));
36 if ($this->percentile) 36 if ($this->percentile)
37 $rrdgraph[] = sprintf('VDEF:pct_%1$s=avg_%1$s,%2$s,PERCENT', crc32hex($sources[$i]), $this->percentile); 37 $rrdgraph[] = sprintf('VDEF:pct_%1$s=avg_%1$s,%2$s,PERCENT', crc32hex($sources[$i]), $this->percentile);
38 if ($this->percentile && $this->negative_io && $i == 1)
39 $rrdgraph[] = sprintf('VDEF:pct_%1$s_neg=avg_%1$s_neg,%2$s,PERCENT', crc32hex($sources[$i]), 100 - $this->percentile);
38 $i++; 40 $i++;
39 } 41 }
40 } 42 }
@@ -70,10 +72,12 @@ class Type_GenericIO extends Type_Base {
70 72
71 if ($this->percentile) { 73 if ($this->percentile) {
72 $rrdgraph[] = 'COMMENT: \l'; 74 $rrdgraph[] = 'COMMENT: \l';
75 $i=0;
73 foreach($sources as $source) { 76 foreach($sources as $source) {
74 $legend = empty($this->legend[$source]) ? $source : $this->legend[$source]; 77 $legend = empty($this->legend[$source]) ? $source : $this->legend[$source];
75 $rrdgraph[] = sprintf('HRULE:pct_%s#%s:%sth Percentile %s', crc32hex($source), $this->get_faded_color($this->colors[$source], '000000', 0.6), $this->percentile, $this->rrd_escape($legend)); 78 $rrdgraph[] = sprintf('LINE:pct_%s%s#%s:%sth Percentile %s', crc32hex($source), ($i == 1 && $this->negative_io) ? '_neg' : '', $this->get_faded_color($this->colors[$source], '000000', 0.6), $this->percentile, $this->rrd_escape($legend));
76 $rrdgraph[] = sprintf('GPRINT:pct_%s:%s\l', crc32hex($source), $this->rrd_format); 79 $rrdgraph[] = sprintf('GPRINT:pct_%s:%s\l', crc32hex($source), $this->rrd_format);
80 $i++;
77 } 81 }
78 } 82 }
79 83