projects / phoronix-test-suite.git / commitdiff
Build Results
 
Summary

Description: Phoronix Test Suite open-source benchmarking development
Last Change: Fri 10/24/14 12:06

Recent Commits
Time
Signed-Off By
Description
Commit Diff
Fri 10/24/14 12:06
Michael Larabel  
phoromatic: Add today's... 
Fri 10/24/14 11:52
Michael Larabel  
phoromatic: Add a... 
Thu 10/23/14 20:07
Michael Larabel  
phoromatic: UI updates by... 
Wed 10/22/14 22:36
Michael Larabel  
 
Wed 10/22/14 21:18
Michael Larabel  
phoromatic: Various... 
Wed 10/22/14 18:02
Michael Larabel  
Install systemd service... 
 
> --git a/CHANGE-LOG b/CHANGE-LOG
index 004cf44
..b1a093e 100644
--- a/CHANGE-LOG
+++ b/CHANGE-LOG
@@ -12,+12,@@ Phoronix Test Suite (Git)
 - 
pts-coreRename parse-results.xml to results-definition.xml
 
pts-coreMore aggressive checks in determining whether to dynamically increase the run count for statistical accuracy
 
pts-coreAllow the sys.time monitor command to work on PHP installations where PCNTL is not supported or available
+- pts_GraphIntroduce Iveland horizontal bar graphs
 
install-shInstaller updates

 Phoronix Test Suite 2.8.1
diff 
--git a/pts-core/objects/bilde_renderer/bilde_renderer.php b/pts-core/objects/bilde_renderer/bilde_renderer.php
index d541e45
..b7aeb2e 100644
--- a/pts-core/objects/bilde_renderer/bilde_renderer.php
+++ b/pts-core/objects/bilde_renderer/bilde_renderer.php
@@ -114,15 +114,32 @@ abstract class bilde_renderer
     
}
     public function 
draw_arrow($tip_x1$tip_y1$tail_x1$tail_y1$background_color$border_color null$border_width 0)
     {
-        
// TODO: Allow better support when arrow is running horizontally or on an angle instead of just vertical
-        $arrow_length sqrt(pow(($tail_x1 $tip_x1), 2) + pow(($tail_y1 $tip_y1), 2));
-        
$arrow_length_half $arrow_length 2;
-
-        
$arrow_points = array(
-        
$tip_x1$tip_y1,
-        
$tail_x1 $arrow_length_half$tail_y1,
-        
$tail_x1 $arrow_length_half$tail_y1
-        );
+        
$is_vertical = ($tip_x1 == $tail_x1);
+
+        if(
$is_vertical)
+        {
+            
// Vertical arrow
+            $arrow_length sqrt(pow(($tail_x1 $tip_x1), 2) + pow(($tail_y1 $tip_y1), 2));
+            
$arrow_length_half $arrow_length 2;
+
+            
$arrow_points = array(
+            
$tip_x1$tip_y1,
+            
$tail_x1 $arrow_length_half$tail_y1,
+            
$tail_x1 $arrow_length_half$tail_y1
+            );
+        }
+        else
+        {
+            
// Horizontal arrow
+            $arrow_length sqrt(pow(($tail_x1 $tip_x1), 2) + pow(($tail_y1 $tip_y1), 2));
+            
$arrow_length_half $arrow_length 2;
+
+            
$arrow_points = array(
+            
$tip_x1$tip_y1,
+            
$tail_x1$tail_y1 $arrow_length_half,
+            
$tail_x1$tail_y1 $arrow_length_half
+            );
+        }

         
$this->draw_polygon($arrow_points$background_color$border_color$border_width);
     }
diff --git a/pts-core/objects/pts_Graph/pts_Graph.php b/pts-core/objects/pts_Graph/pts_Graph.php
index a2bb5c8
..673832e 100644
--- a/pts-core/objects/pts_Graph/pts_Graph.php
+++ b/pts-core/objects/pts_Graph/pts_Graph.php
@@ -69,+69,@@ abstract class pts_Graph
     
protected $graph_proportion null;

     
// Not user-friendly changes below this line
+    protected $graph_orientation "VERTICAL";
     protected 
$graph_body_image false;
     protected 
$graph_hide_identifiers false;
     protected 
$graph_show_key false;
@@ -
90,+91,@@ abstract class pts_Graph
     
protected $graph_y_title_hide false;
     protected 
$graph_top_end;
     protected 
$graph_left_end;
+    protected 
$graph_top_heading_height;

     protected 
$graph_internal_identifiers = array();

@@ -
98,+100,@@ abstract class pts_Graph
     
protected $regression_marker_threshold 0;
     protected 
$is_multi_way_comparison false;
     private 
$test_identifier null;
+    protected 
$iveland_view false;

     public function 
__construct(&$result_object null, &$result_file null)
     {
@@ -
487,14 +490,40 @@ abstract class pts_Graph
         $this
->graph_maximum_value $this->maximum_graph_value();

         
// Make room for tick markings, left hand side
-        if($this->graph_value_type == "NUMERICAL")
+        if(
$this->iveland_view == false)
         {
-            
$this->graph_left_start += $this->text_string_width($this->graph_maximum_value$this->graph_font$this->graph_font_size_tick_mark) + 2;
-        }
+            if(
$this->graph_value_type == "NUMERICAL")
+            {
+                
$this->graph_left_start += $this->text_string_width($this->graph_maximum_value$this->graph_font$this->graph_font_size_tick_mark) + 2;
+            }

-        if(
$this->graph_hide_identifiers)
+            if(
$this->graph_hide_identifiers)
+            {
+                
$this->graph_top_end += $this->graph_top_end_opp 2;
+            }
+        }
+        else
         {
-            
$this->graph_top_end += $this->graph_top_end_opp 2;
+            
$longest_identifier_width $this->text_string_width($this->find_longest_string($this->graph_identifiers), $this->graph_font$this->graph_font_size_identifiers) + 6;
+            
$longest_identifier_max $this->graph_attr_width 0.5;
+
+            
$this->graph_left_start min($longest_identifier_max$longest_identifier_width);
+            
$this->graph_left_end_opp 15;
+            
$this->graph_left_end $this->graph_attr_width $this->graph_left_end_opp;
+
+            
// Pad 8px on top and bottom + title bar + sub-headings
+            $this->graph_top_heading_height 16 $this->graph_font_size_heading + (count($this->graph_sub_titles) * ($this->graph_font_size_sub_heading 4));
+            
$this->graph_top_start $this->graph_top_heading_height 16// + spacing before graph starts
+
+            
$bottom_heading 14;
+
+            if(
$this->graph_orientation == "HORIZONTAL")
+            {
+                
$num_identifiers count($this->graph_identifiers);
+                
$this->graph_top_end $this->graph_top_start + ($num_identifiers 46);
+                
// $this->graph_top_end_opp
+                $this->graph_attr_height $this->graph_top_end 25 $bottom_heading;
+            }
         }

         if((
$key_count count($this->graph_data_title)) > 8)
@@ -
555,+584,11 @@ abstract class pts_Graph
         
}

         
// Background Color
-        if($this->graph_attr_big_border)
+        if(
$this->iveland_view)
+        {
+            
$this->graph_image->draw_rectangle_with_border(00, ($this->graph_attr_width 1), ($this->graph_attr_height 1), $this->graph_color_background$this->graph_color_main_headers);
+        }
+        else if(
$this->graph_attr_big_border)
         {
             
$this->graph_image->draw_rectangle_with_border(00$this->graph_attr_width$this->graph_attr_height$this->graph_color_background$this->graph_color_border);
         }
@@ -
564,+597,@@ abstract class pts_Graph
             $this
->graph_image->draw_rectangle(00$this->graph_attr_width$this->graph_attr_height$this->graph_color_background);
         }

-        if((
$sub_title_count count($this->graph_sub_titles)) > 1)
+        if(
$this->iveland_view == false && ($sub_title_count count($this->graph_sub_titles)) > 1)
         {
             
$this->graph_top_start += (($sub_title_count 1) * ($this->graph_font_size_sub_heading 4));
         }
@@ -
572,28 +605,68 @@ abstract class pts_Graph
     
protected function render_graph_heading($with_version true)
     {
         
// Default to NORMAL
-        $this->graph_image->write_text_center($this->graph_title$this->graph_font$this->graph_font_size_heading$this->graph_color_main_headers$this->graph_left_start3$this->graph_left_end3false"http://global.phoronix-test-suite.com/?k=category&u=" $this->test_identifier);
-
-        foreach(
$this->graph_sub_titles as $i => $sub_title)
+        if(
$this->iveland_view)
         {
-            
$this->graph_image->write_text_center($sub_title$this->graph_font$this->graph_font_size_sub_heading$this->graph_color_main_headers$this->graph_left_start, (31 + ($i 18)), $this->graph_left_end, (31 + ($i 18)), false);
-        }
+            
$this->graph_image->draw_rectangle(00$this->graph_attr_width$this->graph_top_heading_height$this->graph_color_main_headers);
+            
$this->graph_image->write_text_left($this->graph_title$this->graph_font$this->graph_font_size_heading$this->graph_color_background512$this->graph_left_end12false"http://global.phoronix-test-suite.com/?k=category&u=" $this->test_identifier);
+
+            foreach(
$this->graph_sub_titles as $i => $sub_title)
+            {
+                
$vertical_offset 12 $this->graph_font_size_heading + ($i * ($this->graph_font_size_sub_heading 3));
+                
$this->graph_image->write_text_left($sub_title$this->graph_font$this->graph_font_size_sub_heading$this->graph_color_background5$vertical_offset$this->graph_left_end$vertical_offsetfalse);
+            }
+
+            
$pts_logo_height = ($this->graph_top_heading_height 8);
+            
$pts_logo_width = ($pts_logo_height 200) * 385;
+            
$this->graph_image->image_copy_merge($this->graph_image->png_image_to_type("http://www.phoronix-test-suite.com/external/pts-logo-385x200-white.png"), $this->graph_left_end $pts_logo_width400$pts_logo_width$pts_logo_height);

-        if(
$with_version)
+            
$bottom_heading_start $this->graph_top_end 25;
+            
$this->graph_image->draw_rectangle(0$bottom_heading_start$this->graph_attr_width$this->graph_attr_height$this->graph_color_main_headers);
+            
$this->graph_image->write_text_right("Powered By " $this->graph_version$this->graph_font7$this->graph_color_background$this->graph_left_end$bottom_heading_start 6$this->graph_left_end$bottom_heading_start 6false"http://www.phoronix-test-suite.com/");
+        }
+        else
         {
-            
$this->graph_image->write_text_right($this->graph_version$this->graph_font7$this->graph_color_body_light$this->graph_left_end$this->graph_top_start 9$this->graph_left_end$this->graph_top_start 9false"http://www.phoronix-test-suite.com/");
+            
$this->graph_image->write_text_center($this->graph_title$this->graph_font$this->graph_font_size_heading$this->graph_color_main_headers$this->graph_left_start3$this->graph_left_end3false"http://global.phoronix-test-suite.com/?k=category&u=" $this->test_identifier);
+
+            foreach(
$this->graph_sub_titles as $i => $sub_title)
+            {
+                
$this->graph_image->write_text_center($sub_title$this->graph_font$this->graph_font_size_sub_heading$this->graph_color_main_headers$this->graph_left_start, (31 + ($i 18)), $this->graph_left_end, (31 + ($i 18)), false);
+            }
+
+            if(
$with_version)
+            {
+                
$this->graph_image->write_text_right($this->graph_version$this->graph_font7$this->graph_color_body_light$this->graph_left_end$this->graph_top_start 9$this->graph_left_end$this->graph_top_start 9false"http://www.phoronix-test-suite.com/");
+            }
         }
     }
     protected function 
render_graph_base($left_start$top_start$left_end$top_end)
     {
-        
$this->graph_image->draw_rectangle_with_border($left_start$top_start$left_end$top_end$this->graph_color_body$this->graph_color_notches);
+        if(
$this->graph_orientation == "HORIZONTAL")
+        {
+            
$this->graph_image->draw_line($left_start$top_start$left_start$top_end$this->graph_color_notches1);
+            
$this->graph_image->draw_line($left_start$top_end$left_end$top_end$this->graph_color_notches1);

-        if(
$this->graph_body_image != false)
+            if(!empty(
$this->graph_watermark_text))
+            {
+                
$this->graph_image->write_text_right($this->graph_watermark_text$this->graph_font7$this->graph_color_text$left_end 2$top_start 7$left_end 2$top_start 7false$this->graph_watermark_url);
+            }
+        }
+        else
         {
-            
$this->graph_image->image_copy_merge($this->graph_body_image$left_start + (($left_end $left_start) / 2) - imagesx($this->graph_body_image) / 2$top_start + (($top_end $top_start) / 2) - imagesy($this->graph_body_image) / 2);
+            
$this->graph_image->draw_rectangle_with_border($left_start$top_start$left_end$top_end$this->graph_color_body$this->graph_color_notches);
+
+            if(
$this->graph_body_image != false)
+            {
+                
$this->graph_image->image_copy_merge($this->graph_body_image$left_start + (($left_end $left_start) / 2) - imagesx($this->graph_body_image) / 2$top_start + (($top_end $top_start) / 2) - imagesy($this->graph_body_image) / 2);
+            }
+
+            if(!empty(
$this->graph_watermark_text))
+            {
+                
$this->graph_image->write_text_right($this->graph_watermark_text$this->graph_font10$this->graph_color_text$left_end 2$top_start 8$left_end 2$top_start 8false$this->graph_watermark_url);
+            }
         }

-        if(!empty(
$this->graph_y_title) && !$this->graph_y_title_hide)
+        if(!empty(
$this->graph_y_title) && $this->graph_y_title_hide == false)
         {
             
$str $this->graph_y_title;
             
$offset 0;
@@ -
605,14 +678,29 @@ abstract class pts_Graph
                 
switch($this->graph_proportion)
                 {
                     case 
"LIB":
-                        
$proportion "Fewer Are Better";
+                        
$proportion "Less Is Better";
                         
$offset += 12;
-                        
$this->graph_image->draw_arrow($left_start 5$top_start 4$left_start 5$top_start 11$this->graph_color_main_headers$this->graph_color_body_light1);
+
+                        if(
$this->graph_orientation == "HORIZONTAL")
+                        {
+                            
$this->graph_image->draw_arrow($left_start$top_start 7$left_start 9$top_start 7$this->graph_color_main_headers$this->graph_color_body_light1);
+                        }
+                        else
+                        {
+                            
$this->graph_image->draw_arrow($left_start 5$top_start 4$left_start 5$top_start 11$this->graph_color_main_headers$this->graph_color_body_light1);
+                        }
                         break;
                     case 
"HIB":
-                        
//$proportion = "Higher Is Better";
+                        $proportion "Higher Is Better";
                         
$offset += 12;
-                        
$this->graph_image->draw_arrow($left_start 5$top_start 11$left_start 5$top_start 4$this->graph_color_main_headers$this->graph_color_body_light1);
+                        if(
$this->graph_orientation == "HORIZONTAL")
+                        {
+                            
$this->graph_image->draw_arrow($left_start 9$top_start 7$left_start$top_start 7$this->graph_color_main_headers$this->graph_color_body_light1);
+                        }
+                        else
+                        {
+                            
$this->graph_image->draw_arrow($left_start 5$top_start 11$left_start 5$top_start 4$this->graph_color_main_headers$this->graph_color_body_light1);
+                        }
                         break;
                 }

@@ -
622,49 +710,72 @@ abstract class pts_Graph
                     
{
                         
$str .= ", ";
                     }
-
                     
$str .= $proportion;
                 }
             }

             
$this->graph_image->write_text_left($str$this->graph_font7$this->graph_color_main_headers$left_start $offset$top_start 7$left_start $offset$top_start 7);
         }
-
-
-
-        if(!empty(
$this->graph_watermark_text))
-        {
-            
$this->graph_image->write_text_right($this->graph_watermark_text$this->graph_font10$this->graph_color_text$left_end 2$top_start 8$left_end 2$top_start 8false$this->graph_watermark_url);
-        }
     }
     protected function 
render_graph_value_ticks($left_start$top_start$left_end$top_end)
     {
-        
$tick_width = ($top_end $top_start) / $this->graph_attr_marks;
-        
$px_from_left_start $left_start 5;
-        
$px_from_left_end $left_start 5;
-
-        
$display_value 0;
-
-        
$this->graph_image->draw_dashed_line($left_start$top_start $tick_width$left_start, ($top_end 1), $this->graph_color_notches101$tick_width);
+        
$increment round($this->graph_maximum_value $this->graph_attr_marks2);

-        for(
$i 0$i $this->graph_attr_marks$i++)
+        if(
$this->graph_orientation == "HORIZONTAL")
         {
-            
$px_from_top $top_end - ($tick_width $i);
+            
$tick_width = ($left_end $left_start) / $this->graph_attr_marks;
+            
$display_value 0;

-            
//$this->graph_image->draw_line($px_from_left_start, $px_from_top, $px_from_left_end, $px_from_top, $this->graph_color_notches);
+            $this->graph_image->draw_dashed_line($left_start $tick_width$top_end, ($left_end 1), $top_end$this->graph_color_notches101, ($tick_width 1));

-            if(
$display_value != 0)
+            for(
$i 0$i $this->graph_attr_marks$i++)
             {
-                
$this->graph_image->write_text_right($display_value$this->graph_font$this->graph_font_size_tick_mark$this->graph_color_text$px_from_left_start 1$px_from_top 2$px_from_left_start 1$px_from_top 2);
+                
$px_from_left $left_start + ($tick_width $i);
+
+                if(
$display_value != 0)
+                {
+                    
$this->graph_image->write_text_center($display_value$this->graph_font$this->graph_font_size_tick_mark$this->graph_color_text$px_from_left, ($top_end 5), $px_from_left, ($top_end 5));
+                }
+
+                if(
$i != 0)
+                {
+                    
$line_width 6;
+                    
$this->graph_image->draw_dashed_line($px_from_left$top_start$px_from_left$top_end 5$this->graph_color_body155);
+                }
+
+                
$display_value += $increment;
             }

-            if(
$i != && $this->graph_background_lines)
+        }
+        else
+        {
+            
$tick_width = ($top_end $top_start) / $this->graph_attr_marks;
+            
$px_from_left_start $left_start 5;
+            
$px_from_left_end $left_start 5;
+
+            
$display_value 0;
+
+            
$this->graph_image->draw_dashed_line($left_start$top_start $tick_width$left_start, ($top_end 1), $this->graph_color_notches101$tick_width);
+
+            for(
$i 0$i $this->graph_attr_marks$i++)
             {
-                
$line_width 6;
-                
$this->graph_image->draw_dashed_line($px_from_left_end 6$px_from_top$this->graph_left_end 6$px_from_top$this->graph_color_body_light12015);
-            }
+                
$px_from_top $top_end - ($tick_width $i);
+
+                
//$this->graph_image->draw_line($px_from_left_start, $px_from_top, $px_from_left_end, $px_from_top, $this->graph_color_notches);
+
+                if(
$display_value != 0)
+                {
+                    
$this->graph_image->write_text_right($display_value$this->graph_font$this->graph_font_size_tick_mark$this->graph_color_text$px_from_left_start 1$px_from_top 2$px_from_left_start 1$px_from_top 2);
+                }

-            
$display_value += round($this->graph_maximum_value $this->graph_attr_marks2);
+                if(
$i != && $this->graph_background_lines)
+                {
+                    
$line_width 6;
+                    
$this->graph_image->draw_dashed_line($px_from_left_end 6$px_from_top$this->graph_left_end 6$px_from_top$this->graph_color_body_light12015);
+                }
+
+                
$display_value += $increment;
+            }
         }
     }
     protected function 
render_graph_identifiers()
diff --git a/pts-core/objects/pts_Graph/pts_HorizontalBarGraph.php b/pts-core/objects/pts_Graph/pts_HorizontalBarGraph.php
new file mode 100644
index 0000000..007e4e4
--- /dev/null
+++ b/pts-core/objects/pts_Graph/pts_HorizontalBarGraph.php
@@ -0,+1,122 @@
+<?
php
+
+
/*
+    Phoronix Test Suite
+    URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
+    Copyright (C) 2008 - 2010, Phoronix Media
+    Copyright (C) 2008 - 2010, Michael Larabel
+    pts_VerticalBarGraph.php: The vertical bar graph object that extends pts_Graph.php
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 3 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+class 
pts_HorizontalBarGraph extends pts_Graph
+{
+    protected 
$identifier_height = -1;
+
+    public function 
__construct(&$result_object, &$result_file null)
+    {
+        
parent::__construct($result_object$result_file);
+
+        if(
$result_file != null && $result_file instanceOf pts_result_file)
+        {
+            
$this->is_multi_way_comparison $result_file->is_multi_way_comparison();
+        }
+
+        
$this->iveland_view true;
+        
$this->graph_orientation "HORIZONTAL";
+    }
+    protected function 
render_graph_pre_init()
+    {
+        
// Do some common work to this object
+        $identifier_count count($this->graph_identifiers);
+        
$this->identifier_height floor(($this->graph_top_end $this->graph_top_start) / $identifier_count);
+    }
+    protected function 
render_graph_identifiers()
+    {
+        
$px_from_top_end $this->graph_top_end 5;
+
+        
$this->graph_image->draw_dashed_line($this->graph_left_start$this->graph_top_start $this->identifier_height$this->graph_left_start$this->graph_top_end - ($this->graph_attr_height $this->identifier_height), $this->graph_color_notches101$this->identifier_height 1);
+
+        foreach(
array_keys($this->graph_identifiers) as $i)
+        {
+            
$middle_of_vert $this->graph_top_start + ($this->identifier_height * ($i 1)) - ($this->identifier_height 0.6);
+            
$this->graph_image->write_text_right($this->graph_identifiers[$i], $this->graph_font$this->graph_font_size_identifiers$this->graph_color_headers, ($this->graph_left_start 5), $middle_of_vert, ($this->graph_left_start 5), $middle_of_vert);
+        }
+    }
+    protected function 
render_graph_bars()
+    {
+        
$bar_count count($this->graph_data);
+        
$separator_height = ($a = (- (floor($bar_count 2) * 2))) > $a 0;
+        
$bar_height floor(($this->identifier_height $separator_height - ($bar_count $separator_height)) / $bar_count);
+        
$highlight_bar PTS_MODE == "CLIENT" pts_strings::comma_explode(pts_client::read_env("GRAPH_HIGHLIGHT")) : false;
+
+        for(
$i_o 0$i_o $bar_count$i_o++)
+        {
+            
$paint_color $this->get_paint_color((isset($this->graph_data_title[$i_o]) ? $this->graph_data_title[$i_o] : null));
+
+            foreach(
array_keys($this->graph_data[$i_o]) as $i)
+            {
+                
$value pts_math::set_precision($this->graph_data[$i_o][$i], 2);
+                
$graph_size round(($value $this->graph_maximum_value) * ($this->graph_left_end $this->graph_left_start));
+                
$value_end_left $this->graph_left_start $graph_size;
+
+                
$px_bound_top $this->graph_top_start + ($this->identifier_height $i) + ($bar_height $i_o) + ($separator_height * ($i_o 1));
+                
$px_bound_bottom $px_bound_top $bar_height;
+                
$middle_of_bar $px_bound_top + ($bar_height 2);
+
+                if(
$value_end_left 1)
+                {
+                    
$value_end_left 1;
+                }
+
+                
$title_tooltip $this->graph_identifiers[$i] . ": " $value;
+                
$std_error = isset($this->graph_data_raw[$i_o][$i]) ? pts_math::standard_error(pts_strings::colon_explode($this->graph_data_raw[$i_o][$i])) : 0;
+
+                
$this->graph_image->draw_rectangle_with_border($this->graph_left_start$px_bound_top$value_end_left$px_bound_bottomin_array($this->graph_identifiers[$i], $highlight_bar) ? $this->graph_color_alert $paint_color$this->graph_color_body_light$title_tooltip);
+
+                if(
$std_error 0)
+                {
+                    
$std_error_height 8;
+                    
$std_error_rel_size round(($std_error $this->graph_maximum_value) * ($this->graph_left_end $this->graph_left_start));
+                    
$this->graph_image->draw_line(($value_end_left $std_error_rel_size), $px_bound_top, ($value_end_left $std_error_rel_size), $px_bound_top $std_error_height$this->graph_color_body_light1);
+                    
$this->graph_image->draw_line(($value_end_left $std_error_rel_size), $px_bound_top, ($value_end_left $std_error_rel_size), $px_bound_top $std_error_height$this->graph_color_body_light1);
+                    
$this->graph_image->draw_line(($value_end_left $std_error_rel_size), $px_bound_top, ($value_end_left $std_error_rel_size), $px_bound_top$this->graph_color_body_light1);
+
+                    
$bar_offset_34 $middle_of_bar + ($bar_height 5);
+                    
$this->graph_image->write_text_right("SE +/- " pts_math::set_precision($std_error2), $this->graph_font$this->graph_font_size_identifiers 2$this->graph_color_text, ($this->graph_left_start 5), $bar_offset_34, ($this->graph_left_start 5), $bar_offset_34);
+                }
+
+                if(
$this->text_string_width($value$this->graph_font$this->graph_font_size_identifiers) < $graph_size)
+                {
+                    
$this->graph_image->write_text_right($value$this->graph_font$this->graph_font_size_identifiers$this->graph_color_body_text$value_end_left 6$middle_of_bar$value_end_left 6$middle_of_bar);
+                }
+                else
+                {
+                    
// Write it in front of the result
+                    $this->graph_image->write_text_left($value$this->graph_font$this->graph_font_size_identifiers$this->graph_color_text$value_end_left 6$middle_of_bar$value_end_left 6$middle_of_bar);
+                }
+            }
+        }
+
+        
// write a new line along the bottom since the draw_rectangle_with_border above had written on top of it
+        $this->graph_image->draw_line($this->graph_left_start$this->graph_top_end$this->graph_left_end$this->graph_top_end$this->graph_color_notches1);
+    }
+    protected function 
render_graph_result()
+    {
+        
$this->render_graph_bars();
+    }
+}
+
+
?>
diff --git a/pts-core/objects/pts_render.php b/pts-core/objects/pts_render.php
index 2d10852..e54cba4 100644
--- a/pts-core/objects/pts_render.php
+++ b/pts-core/objects/pts_render.php
@@ -53,16 +53,20 @@ class pts_render
         }

         $result_format = $result_object->test_profile->get_result_format();
+        static $bar_orientation = null;

-        switch(pts_Graph::$graph_config->getXmlValue(P_GRAPH_BAR_ORIENTATION))
+        if($bar_orientation == null)
         {
-            case "VERTICAL":
-                $preferred_bar_graph_type = "pts_VerticalBarGraph";
-                break;
-            case "HORIZONTAL":
-            default:
-                $preferred_bar_graph_type = "pts_HorizontalBarGraph";
-                break;
+            switch(pts_Graph::$graph_config->getXmlValue(P_GRAPH_BAR_ORIENTATION))
+            {
+                case "VERTICAL":
+                    $preferred_bar_graph_type = "pts_VerticalBarGraph";
+                    break;
+                case "HORIZONTAL":
+                default:
+                    $preferred_bar_graph_type = "pts_HorizontalBarGraph";
+                    break;
+            }
         }

         switch($result_format)
diff --git a/pts-core/static/graph-config-defaults.xml b/pts-core/static/graph-config-defaults.xml
index 3768272..1c5def5 100644
--- a/pts-core/static/graph-config-defaults.xml
+++ b/pts-core/static/graph-config-defaults.xml
@@ -12,7 +12,7 @@
             <BarOrientation>VERTICAL</BarOrientation>
         </General>
         <Colors>
-            <Background>#FFFFFF</Background>
+            <Background>#FEFEFE</Background>
             <GraphBody>#BABABA</GraphBody>
             <Notches>#454545</Notches>
             <Bord
 
Phoronix.com
Linux Driver Forums
Copyright © 2014 by Phoronix Media