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

Description: Unnamed repository; edit this file to name it for gitweb.
Last Change: Mon 8/30/10 20:43

Recent Commits
Time
Signed-Off By
Description
Commit Diff
Mon 8/30/10 20:43
Michael Larabel  
 
Mon 8/30/10 20:37
Michael Larabel  
pts-core: Last minute... 
Sat 8/28/10 12:53
Michael Larabel  
pts-core: Detect if a... 
Sat 8/28/10 10:34
Michael Larabel  
pts-core: Fix test result... 
Fri 8/27/10 8:51
Michael Larabel  
pts-core: When doing a... 
Wed 8/25/10 18:46
Michael Larabel  
 
 
> --git a/CHANGE-LOG b/CHANGE-LOG
index 8f87a13
..97553aa 100644
--- a/CHANGE-LOG
+++ b/CHANGE-LOG
@@ -9,+9,@@ Phoronix Test Suite
 
Support multiple possible paths in "PossiblePaths" in test profileswith each path delimited by a colon
 
Support if binary is named php5 instead of php
 
Add IgnoreFirstRun argument for test profiles
-- Add support for a test profile to have a downloads.xml file inside their resources folder that contains all of the files that need to be downloadedPhoronix Test Suite then handles the downloading internally as well as verifying the MD5 sumsdownloading from a random URL if multiple URLs are specifiedetcSome other features will come about soon for those using downloads.xml for acquiring all needed files.
+- 
Add support for a test profile to have a downloads.xml file inside their resources folder that contains all of the files that need to be downloadedPhoronix Test Suite then handles the downloading internally as well as verifying the MD5 sumsdownloading from a random URL if multiple URLs are specifiedetcSome other features will come about soon for those using downloads.xml for acquiring all needed files
+- Drop bcdiv/bcmath dependency for pts_Graph, switch to internal function for trimming doubles

 Phoronix Test Suite 0.4.0
 April 24
2008
diff 
--git a/pts-core/objects/pts_BarGraph.php b/pts-core/objects/pts_BarGraph.php
index abced37
..a7d3182 100644
--- a/pts-core/objects/pts_BarGraph.php
+++ b/pts-core/objects/pts_BarGraph.php
@@ -63,+63,@@ class pts_BarGraph extends pts_CustomGraph

         $font_size 
$this->graph_font_size_bars;

-        while(
$this->return_ttf_string_width(bcdiv($this->graph_maximum_value13), $this->graph_font$font_size) > ($bar_width 6))
+        while(
$this->return_ttf_string_width(trim_double($this->graph_maximum_value3), $this->graph_font$font_size) > ($bar_width 6))
             
$font_size -= 0.5;

         for(
$i_o 0$i_o $bar_count$i_o++)
@@ -
98,+98,@@ class pts_BarGraph extends pts_CustomGraph

                 imagerectangle
($this->graph_image$px_bound_left $size_diff_left$value_plot_top 1$px_bound_right $size_diff_right$this->graph_top_end 1$this->graph_color_body_light);
                 
imagefilledrectangle($this->graph_image$px_bound_left $size_diff_left 1$value_plot_top$px_bound_right $size_diff_right 1$this->graph_top_end 1$paint_color);
-                
$value bcdiv($value12);
+                
$value trim_double($value2);

                 if(
$graph_size 20)
                     
$this->gd_write_text_center($this->graph_data[$i_o][$i], $font_size$this->graph_color_body_text$px_bound_left + (($px_bound_right $px_bound_left) / 2), $value_plot_top 3);
diff --git a/pts-core/objects/pts_Graph.php b/pts-core/objects/pts_Graph.php
index 030b306
..9fda9aa 100644
--- a/pts-core/objects/pts_Graph.php
+++ b/pts-core/objects/pts_Graph.php
@@ -125,+125,@@ class pts_Graph
     
{
         for(
$i 0$i count($data_array); $i++)
             if(
is_float($data_array[$i]))
-                
$data_array[$i] = bcdiv($data_array[$i], 12);
+                
$data_array[$i] = trim_double($data_array[$i], 2);

         
array_push($this->graph_data$data_array);
         
array_push($this->graph_data_title$data_title);
@@ -
365,+365,@@ class pts_Graph
                         imageline
($this->graph_image$y$px_from_top$y += ($this->graph_left_end $y) - 1$px_from_top$this->graph_color_body_light);
             }

-            
$display_value += bcdiv($this->graph_maximum_value $this->graph_attr_marks12);
+            
$display_value += trim_double($this->graph_maximum_value $this->graph_attr_marks2);
         }
     }
     public function 
renderGraph()
@@ -
434,+434,30 @@ class pts_Graph
     
{
         
$this->graph_output $file;
     }
+    protected function 
trim_double($double$accuracy 2)
+    {
+        
$return explode("."$double);
+
+        if(
count($return) == 1)
+            
$return[1] = "00";
+
+        if(
count($return) == 2)
+        {
+            
$strlen strlen($return[1]);
+
+            if(
$strlen $accuracy)
+                
$return[1] = substr($return[1], 0$accuracy);
+            else if(
$strlen $accuracy)
+                for(
$i $strlen$i $accuracy$i++)
+                    
$return[1] .= "0";
+
+            
$return $return[0] . "." $return[1];
+        }
+        else
+            
$return $return[0];
+
+        return 
$return;
+    }
 }

 
 
Phoronix.com
Linux Driver Forums
Copyright © 2010 by Phoronix Media