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

Description: Phoronix Test Suite open-source benchmarking development
Last Change: Fri 5/17/13 22:52

Recent Commits
Time
Signed-Off By
Description
Commit Diff
Fri 5/17/13 22:52
Michael Larabel  
phodevi: Report CPU... 
Wed 5/15/13 21:50
Michael Larabel  
Phoronix Test Suite... 
Wed 5/15/13 21:39
Michael Larabel  
pts-core: DragonFlyBSD... 
Wed 5/15/13 15:47
Michael Larabel  
pts-core: Updates from... 
Wed 5/15/13 15:43
Michael Larabel  
 
Sat 5/11/13 13:55
Michael Larabel  
pts-core: Fix for... 
 
> --git a/CHANGE-LOG b/CHANGE-LOG
index 5d674eb
..2e6f4a3 100644
--- a/CHANGE-LOG
+++ b/CHANGE-LOG
@@ -21,+21,@@ Phoronix Test Suite 2.2 (Git)
 - 
pts-coreStandardize PTS test comparison hashes
 
phodeviImprove hardware detection for OpenSolaris SPARC systems using DDU information
 
phodeviImprove motherboard detection for Sun SPARC systems
+- phodeviStart new reporting infrastructure
 
tandem_XmlAdd addXmlObjectFromReader() function for improved performance
 
tandem_XmlAdd saveXMLFile() function
 - 
ptsFixes for compress-lzma and compress-pbzip2 test profiles with name change of compressfile
diff 
--git a/pts-core/library/pts-functions_system.php b/pts-core/library/pts-functions_system.php
index 4b5d227
..a4f6f5f 100644
--- a/pts-core/library/pts-functions_system.php
+++ b/pts-core/library/pts-functions_system.php
@@ -23,27 +23,13 @@

 require_once(
PTS_LIBRARY_PATH "pts-functions_system_parsing.php");

-
// TODO: Further integration with Phodevi
-
 function 
pts_hw_string($return_string true)
 {
-    
// Returns string of hardware information
-    $hw = array();
-
-    
$hw["Processor"] = phodevi::read_name("cpu");
-    
$hw["Motherboard"] = phodevi::read_name("motherboard");
-    
$hw["Chipset"] = phodevi::read_name("chipset");
-    
$hw["System Memory"] = phodevi::read_name("memory");
-    
$hw["Disk"] = phodevi::read_name("disk");
-    
$hw["Graphics"] = phodevi::read_name("gpu");
-    
$hw["Monitor"] = phodevi::read_name("monitor");
-
-    
$hw pts_remove_unsupported_entries($hw);
-
-    return 
pts_process_string_array($return_string$hw);
+    return 
phodevi::system_hardware();
 }
 function 
pts_sw_string($return_string true)
 {
+    
// TODO: port to Phodevi module similar to the pts_hw_string()
     // Returns string of software information
     
$sw = array();

diff --git a/pts-core/objects/phodevi/phodevi.php b/pts-core/objects/phodevi/phodevi.php
index 375655c
..d551bf0 100644
--- a/pts-core/objects/phodevi/phodevi.php
+++ b/pts-core/objects/phodevi/phodevi.php
@@ -34,+34,22 @@ class phodevi
     
{
         return 
phodevi::read_property($device"identifier");
     }
+    public static function 
available_hardware_devices()
+    {
+        return array(
+        
"Processor" => "cpu",
+        
"Motherboard" => "motherboard",
+        
"Chipset" => "chipset",
+        
"System Memory" => "memory",
+        
"Disk" => "disk",
+        
"Graphics" => "gpu",
+        
"Monitor" => "monitor"
+        );
+    }
+    public static function 
system_hardware($return_as_string true)
+    {
+        return 
self::system_information_parse(self::available_hardware_devices(), $return_as_string);
+    }
     public static function 
read_sensor($device$read_sensor)
     {
         
$value false;
@@ -
239,+255,39 @@ class phodevi
                 serialize
(new phodevi_cache(self::$smart_cache$store_dir$client_version)));
         }
     }
+    protected static function 
system_information_parse($component_array$return_as_string true)
+    {
+        
// Returns string of hardware information
+        $info = array();
+
+        foreach(
$component_array as $string => $id)
+        {
+            
$value self::read_name($id);
+
+            if(
$value != -&& !empty($value))
+            {
+                
$info[$string] = $value;
+            }
+        }
+
+        if(
$return_as_string)
+        {
+            
$info_array $info;
+            
$info "";
+
+            foreach(
$info_array as $type => $value)
+            {
+                if(
$info != "")
+                {
+                    
$info .= ", ";
+                }
+
+                
$info .= $type ": " $value;
+            }
+        }
+
+        return 
$info;
+    }
 }

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