X-Git-Url: https://git.octo.it/?a=blobdiff_plain;ds=sidebyside;f=examples%2Fpiped-demo.pl.in;h=82232fb9d5f2c4c7f13b5c19bf12a4da57ae5ef5;hb=3203b8b2149ddb630081c35784d5964f32e6dcc2;hp=6021f5d47605cfa85a82412a04ded015ab55ec80;hpb=a1fe8fd19bb4f558150e52c0624869667b739877;p=rrdtool.git diff --git a/examples/piped-demo.pl.in b/examples/piped-demo.pl.in index 6021f5d..82232fb 100755 --- a/examples/piped-demo.pl.in +++ b/examples/piped-demo.pl.in @@ -16,7 +16,7 @@ $STEP = 300; $RUNS = 12*24*30*6; $GRUNS = 20; $RRD = "piped-demo.rrd"; -$GIF = "piped-demo.gif"; +$SVG = "piped-demo.svg"; $PNG = "piped-demo.png"; # some magic to find the correct rrdtol executable @@ -67,11 +67,13 @@ printf "-- performance analysis Update test\n". print "\n"; # creating some graphs -print "* Creating $GRUNS GIF graphs: $GIF\n\n"; +print "* Creating $GRUNS SVG graphs: $SVG\n\n"; $now = time; +$localtime = scalar localtime(time); +$localtime = s/:/\\:/g; for ($i=0;$i<$GRUNS;$i++) { -RRDp::cmd "graph $GIF ", "--title 'Test GRAPH' ", - "--height 150 --vertical-label 'Dummy Units' ". +RRDp::cmd "graph $SVG ", "--title 'Test GRAPH' ", + "--imgformat SVG --height 150 --vertical-label 'Dummy Units' ". "--start now".(-$RUNS*$STEP), "--color ARROW#bfbfbf", "DEF:alpha=$RRD:in:AVERAGE", @@ -88,7 +90,7 @@ RRDp::cmd "graph $GIF ", "--title 'Test GRAPH' ", "GPRINT:calc:MAX:'Max calc\\: %1.2lf %S'", "VRULE:".($now-3600)."#008877:'60 Minutes ago'", "COMMENT:'\\s'", - "COMMENT:'Graph created on: ".localtime(time())."\\c'"; + "COMMENT:'Graph created on\\: ".$localtime."\\c'"; $answer = RRDp::read; } @@ -126,7 +128,7 @@ RRDp::cmd "graph $PNG ", "--title 'Test GRAPH' ", "GPRINT:calc:MAX:'Max calc\\: %1.2lf %S'", "VRULE:".($now-3600)."#008877:'60 Minutes ago'", "COMMENT:'\\s'", - "COMMENT:'Graph created on: ".localtime(time())."\\c'"; + "COMMENT:'Graph created on\\: ".localtime(time())."\\c'"; $answer = RRDp::read; }