summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 079ec11)
raw | patch | inline | side by side (parent: 079ec11)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Tue, 7 Apr 2009 06:37:17 +0000 (06:37 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Tue, 7 Apr 2009 06:37:17 +0000 (06:37 +0000) |
calculation elements are run. The main time saving comes from the fact that
the graph is not being drawn and the image does not have to be compressed.
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1773 a5681a0c-68f1-0310-ab6d-d61299d08faa
the graph is not being drawn and the image does not have to be compressed.
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1773 a5681a0c-68f1-0310-ab6d-d61299d08faa
program/NEWS | patch | blob | history | |
program/doc/rrdgraph.pod | patch | blob | history | |
program/src/rrd_graph.c | patch | blob | history |
diff --git a/program/NEWS b/program/NEWS
index 1f3b38bca3474fe01b111ff34068bc50469e7c54..4d8281d5fceaa267d6bd5fc1acec71e236b185b1 100644 (file)
--- a/program/NEWS
+++ b/program/NEWS
RRDflush
--------
* instruct the rrdcached to flush all its data
+
index b798ff92dafda29603b435ff20bae51d19459432..72728e7f4ba61e2dd922a5be3db7aa55a1e2de6f 100644 (file)
--- a/program/doc/rrdgraph.pod
+++ b/program/doc/rrdgraph.pod
[B<-z>|B<--lazy>]
Only generate the graph if the current graph is out of date or not existent.
-Note, that only the image size will be returned, if you run with lazy even
-when using graphv and even when using PRINT.
-
+Note, that all the calculations will happen regardless so that the output of
+PRINT and graphv will be complete regardless. Note that the behaviour of
+lazy in this regard has seen several changes over time. The only thing you
+can realy rely on before rrdtool 1.3.7 is that lazy will not generate the
+graph when it is already there and up to date, and also that it will output
+the size of the graph.
[B<--daemon> I<address>]
index 549e08c783d097e006af7335faf56f9414a86ba5..a0de36e43672c46c992dfc81a25ea7efad740d7f 100644 (file)
--- a/program/src/rrd_graph.c
+++ b/program/src/rrd_graph.c
// PangoFontMap *font_map = pango_cairo_font_map_get_default();
- /* if we want and can be lazy ... quit now */
- if (lazy) {
- info.u_cnt = im->ximg;
- grinfo_push(im, sprintf_alloc("image_width"), RD_I_CNT, info);
- info.u_cnt = im->yimg;
- grinfo_push(im, sprintf_alloc("image_height"), RD_I_CNT, info);
- return 0;
- }
/* pull the data from the rrd files ... */
if (data_fetch(im) == -1)
return -1;
if (i < 0)
return -1;
- if ((i == 0) || lazy)
+ /* if we want and can be lazy ... quit now */
+ if (i == 0)
return 0;
/**************************************************************
info.u_cnt = im->end;
grinfo_push(im, sprintf_alloc("graph_end"), RD_I_CNT, info);
+ /* if we want and can be lazy ... quit now */
+ if (lazy)
+ return 0;
+
/* get actual drawing data and find min and max values */
if (data_proc(im) == -1)
return -1;
info.u_val = im->maxval;
grinfo_push(im, sprintf_alloc("value_max"), RD_I_VAL, info);
+
if (!calc_horizontal_grid(im))
return -1;
/* reset precalc */