Changeset 28752
- Timestamp:
- Jul 28, 2010, 4:12:14 PM (16 years ago)
- Location:
- trunk/tools
- Files:
-
- 5 edited
-
czarplot.pl (modified) (1 diff)
-
czartool/CzarDb.pm (modified) (5 diffs)
-
czartool/Czarplot.pm (modified) (1 diff)
-
czartool/MySQLDb.pm (modified) (1 diff)
-
roboczar.pl (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/czarplot.pl
r28719 r28752 64 64 else {$savingToFile = 1;} 65 65 66 my $czarDb = new czartool::CzarDb($czarDbName, "ippdb01", "ipp", "ipp", $verbose );66 my $czarDb = new czartool::CzarDb($czarDbName, "ippdb01", "ipp", "ipp", $verbose, $save_temps); 67 67 $czarDb->setDateFormat("%Y%m%d-%H%i%s"); 68 68 -
trunk/tools/czartool/CzarDb.pm
r28719 r28752 2 2 3 3 package czartool::CzarDb; 4 5 4 6 5 use warnings; … … 10 9 11 10 my @stages = ("chip", "cam", "fake", "warp", "stack", "diff", "magic", "magicDS", "dist"); # TODO put elsewhere 12 13 11 14 12 use base 'czartool::MySQLDb'; … … 20 18 21 19 # Call the constructor of the parent class, Person. 22 my $self = $class->SUPER::new( $_[1], $_[2], $_[3], $_[4], $_[5] );20 my $self = $class->SUPER::new( $_[1], $_[2], $_[3], $_[4], $_[5], $_[6]); 23 21 24 22 bless $self, $class; … … 147 145 ########################################################################### 148 146 sub getTimeDifference { # TODO fix this 149 my ($self, $ save_temps, $fromTime, $toTime) = @_; # TODO save_temps should be constructor arg150 151 my ($tempFile, $tempName) = tempfile( "/tmp/czartool_gnuplot_timeseries.XXXX", UNLINK => !$s ave_temps);147 my ($self, $fromTime, $toTime) = @_; 148 149 my ($tempFile, $tempName) = tempfile( "/tmp/czartool_gnuplot_timeseries.XXXX", UNLINK => !$self->{_save_temps}); 152 150 153 151 my $query = $self->{_db}->prepare(<<SQL); … … 167 165 ########################################################################### 168 166 sub createTimeSeriesData { 169 my ($self, $ save_temps, $label, $table, $fromTime, $toTime, $minX, $maxX, $minY, $maxY, $timeDiff) = @_; # TODO save_temps should be constructor arg170 171 my ($tempFile, $tempName) = tempfile( "/tmp/czartool_gnuplot_timeseries.XXXX", UNLINK => !$s ave_temps);167 my ($self, $label, $table, $fromTime, $toTime, $minX, $maxX, $minY, $maxY, $timeDiff) = @_; 168 169 my ($tempFile, $tempName) = tempfile( "/tmp/czartool_gnuplot_timeseries.XXXX", UNLINK => !$self->{_save_temps}); 172 170 173 171 my $query = $self->{_db}->prepare(<<SQL); -
trunk/tools/czartool/Czarplot.pm
r28728 r28752 66 66 my $stage = undef; 67 67 foreach $stage (@{$stages}) { 68 $gnuplotFiles{$stage} = $self->{_czarDb}->createTimeSeriesData($ self->{_save_temps}, $label, $stage, $beginTime, $endTime, \$minX, \$maxX, \$minY, \$maxY, \$timeDiff);68 $gnuplotFiles{$stage} = $self->{_czarDb}->createTimeSeriesData($label, $stage, $beginTime, $endTime, \$minX, \$maxX, \$minY, \$maxY, \$timeDiff); 69 69 } 70 70 -
trunk/tools/czartool/MySQLDb.pm
r28704 r28752 21 21 _dbPass => shift, 22 22 _verbose => shift, 23 _save_temps => shift, 23 24 }; 24 25 -
trunk/tools/roboczar.pl
r28729 r28752 17 17 my $save_temps = 0; 18 18 19 my $czarDb = new czartool::CzarDb($czarDbName, "ippdb01", "ipp", "ipp");20 my $gpc1Db = new czartool::Gpc1Db("gpc1", "ippdb01", "ippuser", "ippuser");21 my $pantasks = new czartool::Pantasks();22 my $czarplot = new czartool::Czarplot($czarDb, "%Y%m%d-%H%M%S", "png", "~/", $save_temps);23 $czarDb->setDateFormat("%Y%m%d-%H%i%s");24 25 my @stages = ("chip", "cam", "fake", "warp", "stack", "diff", "magic", "magicDS", "dist");26 27 28 19 GetOptions ( 29 20 "period|p=s" => \$period, # TODO more Db args 30 21 "dbname|d=s" => \$czarDbName, 31 22 ); 23 24 my $czarDb = new czartool::CzarDb($czarDbName, "ippdb01", "ipp", "ipp", 0, $save_temps); # TODO last arg here is save_temps, should get as arg 25 my $gpc1Db = new czartool::Gpc1Db("gpc1", "ippdb01", "ippuser", "ippuser"); 26 my $pantasks = new czartool::Pantasks(); 27 my $czarplot = new czartool::Czarplot($czarDb, "%Y%m%d-%H%M%S", "png", "/tmp", $save_temps); 28 $czarDb->setDateFormat("%Y%m%d-%H%i%s"); 29 30 my @stages = ("chip", "cam", "fake", "warp", "stack", "diff", "magic", "magicDS", "dist"); 31 32 32 33 33 timePoll($period);
Note:
See TracChangeset
for help on using the changeset viewer.
