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 2db27c2
..466da47 100644
--- a/CHANGE-LOG
+++ b/CHANGE-LOG
@@ -4,+4,@@ Phoronix Test Suite (Git)

 - 
pts-coreSupport download caches at /run/media/*/*/download-cache/
 - 
pts_GraphOnly render as much room for pts_OverViewGraph as there are for what will be rendered (bar graph values)
+- 
system_monitorAdd support for handling i915_energy monitor reading in microJoules for each test run

 Phoronix Test Suite 4.0 Milestone 3
 22 May 2012
diff 
--git a/pts-core/modules/system_monitor.php b/pts-core/modules/system_monitor.php
index 53bd7ed
..b4f9738 100644
--- a/pts-core/modules/system_monitor.php
+++ b/pts-core/modules/system_monitor.php
@@ -39,+39,@@ class system_monitor extends pts_module_interface

     
private static $sensor_monitoring_frequency 2;

+    private static 
$monitor_i915_energy false// special case of monitoring since it's not tapping Phodevi (right now at least)
+
     public static function 
module_environmental_variables()
     {
         return array(
'MONITOR''PERFORMANCE_PER_WATT');
@@ -
92,+94,13 @@ class system_monitor extends pts_module_interface
             
}
         }

+        if(
in_array('i915_energy'$to_show) && is_readable('/sys/kernel/debug/dri/0/i915_energy'))
+        {
+            
// For now the Intel monitoring is a special case separate from the rest
+            // of the unified sensor monitoring since we're not polling it every time but just pre/post test.
+            self::$monitor_i915_energy true;
+        }
+
         if(
count(self::$to_monitor) > 0)
         {
             echo 
PHP_EOL 'Sensors To Be Logged:';
@@ -
125,+134,12 @@ class system_monitor extends pts_module_interface

         
// Just to pad in some idling into the run process
         
sleep(self::$sensor_monitoring_frequency);
+
+        if(
self::$monitor_i915_energy)
+        {
+            
// Just read i915_energy to reset the joule counter
+            file_get_contents('/sys/kernel/debug/dri/0/i915_energy');
+        }
     }
     public static function 
__post_test_run_success($test_run_request)
     {
@@ -
132,+147,@@ class system_monitor extends pts_module_interface
     
}
     public static function 
__post_test_run_process(&$result_file_writer)
     {
-        if(
self::$individual_monitoring == false || count(self::$to_monitor) == 0)
+        if((
self::$individual_monitoring == false || count(self::$to_monitor) == 0) && self::$monitor_i915_energy == false)
         {
             return;
         }
@@ -
206,+221,29 @@ class system_monitor extends pts_module_interface
             self
::$individual_test_run_offsets[phodevi::sensor_identifier($sensor)] = array();
         }

+        if(
self::$monitor_i915_energy)
+        {
+            
$i915_energy file_get_contents('/sys/kernel/debug/dri/0/i915_energy');
+
+            if((
$uj strpos($i915_energy' uJ')))
+            {
+                
$uj substr($i915_energy0$uj);
+                
$uj substr($uj, (strrpos($uj' ') + 1));
+
+                if(
is_numeric($uj))
+                {
+                    
$test_result = clone self::$individual_test_run_request;
+                    
$test_result->test_profile->set_identifier(null);
+                    
$test_result->test_profile->set_result_proportion('LIB');
+                    
$test_result->test_profile->set_display_format('BAR_GRAPH');
+                    
$test_result->test_profile->set_result_scale('micro Joules');
+                    
$test_result->set_used_arguments_description('i915_energy Monitor');
+                    
$test_result->set_used_arguments('i915_energy ' $test_result->get_arguments());
+                    
$result_file_writer->add_result_from_result_object_with_value_string($test_result$uj);
+                }
+            }
+        }
+
         
self::$successful_test_run_request null;
         
self::$individual_test_run_request null;
         
self::$monitor_test_count++;
<
 
Phoronix.com
Linux Driver Forums
Copyright © 2013 by Phoronix Media