Changeset 29711
- Timestamp:
- Nov 8, 2010, 3:38:59 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/tools/czartool/CzarDb.pm (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/czartool/CzarDb.pm
r29702 r29711 575 575 $query->execute; 576 576 577 my $tmpFile = File::Temp->new( TEMPLATE => "czarplot_gnuplot_".$label."_".$stage."_t.XXXXX", DIR => '/tmp', SUFFIX => ' .dat');577 my $tmpFile = File::Temp->new( TEMPLATE => "czarplot_gnuplot_".$label."_".$stage."_t.XXXXX", DIR => '/tmp', SUFFIX => 'dat'); 578 578 $tmpFile->unlink_on_destroy( 0 ); 579 579 ${$dataFile} = $tmpFile->filename; … … 590 590 591 591 $linearProcessed = 0; 592 my $someData = 0; 592 593 while (my @row = $query->fetchrow_array()) { 593 594 my ($thisTimestamp, $thisPending, $thisFaults, $thisProcessed) = @row; … … 640 641 else {print GNUDAT "$timestamp $linearPending $linearFaults $linearProcessed\n";} 641 642 643 if ($linearPending > 0 || $linearFaults > 0 || $linearProcessed > 0) {$someData = 1;} 644 642 645 $lastProcessed = $thisProcessed; 643 646 $lastPending = $thisPending; … … 648 651 close(GNUDAT) or print "* Problem closing gnuplot data file for plot for '$label' '$stage'\n"; 649 652 650 return 1;653 #return $someData; 651 654 } 652 655 … … 805 808 ########################################################################### 806 809 sub createStorageTimeSeriesData { 807 my ($self, $fromTime, $toTime, $minX, $maxX, $minY, $maxY, $timeDiff) = @_; 808 809 my $dataFile = "/tmp/czarplot_gnuplot_storage_timeseries.dat"; 810 open (GNUDAT, ">$dataFile"); 810 my ($self, $tmpFile, $fromTime, $toTime, $minX, $maxX, $minY, $maxY, $timeDiff) = @_; 811 812 open (GNUDAT, ">".$tmpFile->filename); 811 813 812 814 my $query = $self->{_db}->prepare(<<SQL); … … 844 846 845 847 close(GNUDAT); 846 847 return $dataFile;848 848 } 849 849 … … 870 870 open (GNUDAT, ">${$dataFile}") or print "* Problem opening gnuplot data file for plot for '$label' '$stage'\n"; 871 871 my $cleanupCarry = 0; 872 my $someData = 0; 872 873 while(1) { 873 874 … … 878 879 print GNUDAT "$timestamp $processed 0 0\n"; 879 880 881 if ($processed > 0 ) {$someData = 1;} 882 880 883 $startTime = $endTime; 881 884 } 882 885 883 close(GNUDAT) or print "* Problem closing gnuplot data file for rate plot for '$label' '$stage'\n" 886 close(GNUDAT) or print "* Problem closing gnuplot data file for rate plot for '$label' '$stage'\n"; 887 888 #return $someData; 884 889 } 885 890
Note:
See TracChangeset
for help on using the changeset viewer.
