projects
/
rrdtool.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added libdbi doc to extradist
[rrdtool.git]
/
examples
/
shared-demo.pl.in
diff --git
a/examples/shared-demo.pl.in
b/examples/shared-demo.pl.in
index
596fb06
..
f01c1ae
100755
(executable)
--- a/
examples/shared-demo.pl.in
+++ b/
examples/shared-demo.pl.in
@@
-14,11
+14,8
@@
sub ok
print "ok $ok_count $what\n";
}
print "ok $ok_count $what\n";
}
-#makes things work when run without install
-use lib qw( ../bindings/perl-shared/blib/lib ../bindings/perl-shared/blib/arch );
-
#makes programm work AFTER install
#makes programm work AFTER install
-use lib qw( @prefix@/lib/perl
../lib/perl
);
+use lib qw( @prefix@/lib/perl );
use strict;
use vars qw(@ISA $loaded);
use strict;
use vars qw(@ISA $loaded);
@@
-91,7
+88,7
@@
my $counter = 1e7;
for (my $t=$START+1;
$t<$START+$STEP*$RUNS;
$t+=$STEP+int((rand()-0.5)*7)){
for (my $t=$START+1;
$t<$START+$STEP*$RUNS;
$t+=$STEP+int((rand()-0.5)*7)){
- $counter +=
2500*sin($t/2000)*$STEP
;
+ $counter +=
int(2500*sin($t/2000)*$STEP)
;
my $data = (1000+500*sin($t/1000)).":".
(1000+900*sin($t/2330)).":".
(2000*cos($t/1550)).":".
my $data = (1000+500*sin($t/1000)).":".
(1000+900*sin($t/2330)).":".
(2000*cos($t/1550)).":".
@@
-145,7
+142,7
@@
for (my $i=0;$i<$GRUNS;$i++) {
"VRULE:".($now-7200)."#008877:120 Minutes ago";
if ($ERROR = RRDs::error) {
"VRULE:".($now-7200)."#008877:120 Minutes ago";
if ($ERROR = RRDs::error) {
-
print
"ERROR: $ERROR\n";
+
die
"ERROR: $ERROR\n";
} else {
print "Image Size: ${xs}x${ys}\n";
print "Graph Return:\n",(join "\n", @$graphret),"\n\n";
} else {
print "Image Size: ${xs}x${ys}\n";
print "Graph Return:\n",(join "\n", @$graphret),"\n\n";
@@
-157,7
+154,7
@@
for (my $i=0;$i<$GRUNS;$i++) {
my ($start,$step,$names,$array) = RRDs::fetch $RRD1, "AVERAGE";
$ERROR = RRDs::error;
my ($start,$step,$names,$array) = RRDs::fetch $RRD1, "AVERAGE";
$ERROR = RRDs::error;
-
print
"ERROR: $ERROR\n" if $ERROR ;
+
die
"ERROR: $ERROR\n" if $ERROR ;
print "start=$start, step=$step\n";
print " ";
map {printf("%12s",$_)} @$names ;
print "start=$start, step=$step\n";
print " ";
map {printf("%12s",$_)} @$names ;