summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 12fcfb0)
raw | patch | inline | side by side (parent: 12fcfb0)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Thu, 8 Nov 2007 10:16:27 +0000 (10:16 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Thu, 8 Nov 2007 10:16:27 +0000 (10:16 +0000) |
program/NEWS | patch | blob | history | |
program/bindings/ruby/main.c | patch | blob | history | |
program/doc/rrdruby.pod | patch | blob | history |
diff --git a/program/NEWS b/program/NEWS
index 6054e3593f08853674b7ee5b912362d551d70dd7..b1fa64b352d5193c411ef5251b3d274119431393 100644 (file)
--- a/program/NEWS
+++ b/program/NEWS
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
index c5cf79effdfcb7569ea32812ff6e043b477baa27..90f883bc237ecdde64ac1d3c28fa4af695c907e6 100644 (file)
}
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;
}
index 963344711b9419d32497acb55ad351340bf4a567..5a647939ffb38d851fa9831ce314a7eaad96c899 100644 (file)
--- a/program/doc/rrdruby.pod
+++ b/program/doc/rrdruby.pod
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