method. It is a drop-in replacement for HWPREDICT, and is better suited for
data whose seasonal variations grow or shrink in proportion to the average.
+Misc
+----
+* ruby rrd_fetch will return step as a last property -- Mike Perham
+
Incompatibility
---------------
* If you create an RRD with the new MHWPREDICT function, the resulting rrdfile will
}
free(raw_data);
- result = rb_ary_new2(4);
- rb_ary_store(result, 0, INT2FIX(start));
- rb_ary_store(result, 1, INT2FIX(end));
+ result = rb_ary_new2(5);
+ rb_ary_store(result, 0, INT2NUM(start));
+ rb_ary_store(result, 1, INT2NUM(end));
rb_ary_store(result, 2, names);
rb_ary_store(result, 3, data);
+ rb_ary_store(result, 4, INT2FIX(step));
return result;
}
puts
puts "fetching data from #{rrd}"
- (fstart, fend, data) = RRD.fetch(rrd, "--start", start.to_s, "--end",
+ (fstart, fend, data, step) = RRD.fetch(rrd, "--start", start.to_s, "--end",
(start + 300 * 300).to_s, "AVERAGE")
puts "got #{data.length} data points from #{fstart} to #{fend}"
puts