summaryrefslogtreecommitdiff
path: root/databases/rrdtool/patches/patch-ao
blob: 8be92df89ae414acb8c50b0ef9dfc0070a0a1d96 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
$NetBSD: patch-ao,v 1.4 2003/02/16 23:08:59 seb Exp $

--- examples/shared-demo.pl.in.orig	Tue May  7 21:51:19 2002
+++ examples/shared-demo.pl.in
@@ -36,8 +36,8 @@ my $RUNS  = 500;
 my $GRUNS = 4;
 my $RRD1  = "shared-demo.rrd";
 my $RRD2  = "shared-demob.rrd";
-my $GIF1  = "shared-demo1.gif";
-my $GIF2  = "shared-demo2.gif";
+my $PNG1  = "shared-demo1.png";
+my $PNG2  = "shared-demo2.png";
 my $time  = 30*int(time/30);
 my $START = $time-$RUNS*$STEP;
 
@@ -109,18 +109,18 @@ if ($ERROR = RRDs::error) {
   die "$0: unable to update `$RRD2': $ERROR\n";
 }
 
-print "* Creating $GRUNS graphs: $GIF1 & $GIF2\n\n";
+print "* Creating $GRUNS graphs: $PNG1 & $PNG2\n\n";
 my $now = $time;
 for (my $i=0;$i<$GRUNS;$i++) {
-  my @rrd_gifs = ($RRD1, $GIF1, $RRD2, $GIF2);
-  while (@rrd_gifs) {
-    my $RRD = shift(@rrd_gifs);
-    my $GIF = shift(@rrd_gifs);
-    my ($graphret,$xs,$ys) = RRDs::graph $GIF, "--title", 'Test GRAPH', 
+  my @rrd_pngs = ($RRD1, $PNG1, $RRD2, $PNG2);
+  while (@rrd_pngs) {
+    my $RRD = shift(@rrd_pngs);
+    my $PNG = shift(@rrd_pngs);
+    my ($graphret,$xs,$ys) = RRDs::graph $PNG, "--title", 'Test GRAPH', 
     '--base', '1024',
           "--vertical-label", 'Dummy Units', "--start", (-$RUNS*$STEP),
           "--end", $time,
-	  "--interlace", "--imgformat","GIF",
+	  "--interlace", "--imgformat","PNG",
           "DEF:alpha=$RRD:a:AVERAGE",
           "DEF:beta=$RRD:b:AVERAGE",
           "DEF:gamma=$RRD:c:AVERAGE",
@@ -147,7 +147,7 @@ for (my $i=0;$i<$GRUNS;$i++) {
     if ($ERROR = RRDs::error) {
       print "ERROR: $ERROR\n";
     } else {
-      print "GIF Size: ${xs}x${ys}\n";
+      print "PNG Size: ${xs}x${ys}\n";
       print "Graph Return:\n",(join "\n", @$graphret),"\n\n";
     }
   }