diff options
author | Steven Knight <knight@baldmt.com> | 2008-10-07 04:52:38 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2008-10-07 04:52:38 (GMT) |
commit | 856870a4151e82c4511b4ca2e77240685d10c4af (patch) | |
tree | 081d8386031bb406d2a0c86a04d597b5c1c3143a | |
parent | d91fcf97d58b71e4ec57b405be51dd1f923eff79 (diff) | |
download | SCons-856870a4151e82c4511b4ca2e77240685d10c4af.zip SCons-856870a4151e82c4511b4ca2e77240685d10c4af.tar.gz SCons-856870a4151e82c4511b4ca2e77240685d10c4af.tar.bz2 |
Fix label placement in gnuplot graphs by the "scons-time.py func"
subcommand when a profile result is equal to (or near) 0.0.
-rw-r--r-- | src/CHANGES.txt | 9 | ||||
-rw-r--r-- | src/script/scons-time.py | 4 | ||||
-rw-r--r-- | test/scons-time/func/file.py | 4 |
3 files changed, 13 insertions, 4 deletions
diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 4217dab..69a874f 100644 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -10,6 +10,15 @@ RELEASE 1.X - XXX + From Steven Knight: + + - Fix label placement by the "scons-time.py func" subcommand + when a profile value was close to (or equal to) 0.0. + + + +RELEASE 1.X - XXX + From Chris AtLee - Use the specified environment when checking for the GCC compiler diff --git a/src/script/scons-time.py b/src/script/scons-time.py index d651ba9..4c74411 100644 --- a/src/script/scons-time.py +++ b/src/script/scons-time.py @@ -166,13 +166,13 @@ class Gnuplotter(Plotter): result = [] for line in self.lines: result.extend(line.get_x_values()) - return filter(None, result) + return filter(lambda r: not r is None, result) def get_all_y_values(self): result = [] for line in self.lines: result.extend(line.get_y_values()) - return filter(None, result) + return filter(lambda r: not r is None, result) def get_min_x(self): try: diff --git a/test/scons-time/func/file.py b/test/scons-time/func/file.py index 079c125..33a9908 100644 --- a/test/scons-time/func/file.py +++ b/test/scons-time/func/file.py @@ -74,8 +74,8 @@ vertical_bars = ( expect2 = \ r"""set title "ST2.CONF TITLE" set key bottom left -set label 3 "label 1.5" at 0.5,1.5 right -set label 4 "label 1.6" at 0.6,1.5 right +set label 3 "label 1.5" at 0.5,0.5 right +set label 4 "label 1.6" at 0.6,0.4 right plot '-' title "Startup" with lines lt 1, \ '-' notitle with lines lt 7, \ '-' title "label 1.5" with lines lt 7, \ |