From 856870a4151e82c4511b4ca2e77240685d10c4af Mon Sep 17 00:00:00 2001 From: Steven Knight Date: Tue, 7 Oct 2008 04:52:38 +0000 Subject: Fix label placement in gnuplot graphs by the "scons-time.py func" subcommand when a profile result is equal to (or near) 0.0. --- src/CHANGES.txt | 9 +++++++++ src/script/scons-time.py | 4 ++-- 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, \ -- cgit v0.12