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

Description: Phoronix Test Suite open-source benchmarking development
Last Change: Sat 4/19/14 18:06

Recent Commits
Time
Signed-Off By
Description
Commit Diff
Sat 4/19/14 18:06
Michael Larabel  
phoromatic: Continued... 
Sat 4/19/14 12:56
Michael Larabel  
phoromatic: Add groups... 
Fri 4/18/14 11:23
Michael Larabel  
phodevi: Add GPU usage... 
Wed 12/31/69 19:00
5cc96094d0ca5ff618655eed3c3f7e242634789d  
Merge pull request #20... 
Wed 4/16/14 13:04
Michael Larabel  
pts-core: Allow a range... 
Tue 4/15/14 20:56
Michael Larabel  
phoromatic: Add setting... 
 
> --git a/pts-core/functions/pts-functions.php b/pts-core/functions/pts-functions.php
index c42a8a5
..5801265 100644
--- a/pts-core/functions/pts-functions.php
+++ b/pts-core/functions/pts-functions.php
@@ -197,+197,10 @@ function pts_env_variables()
     
"PTS_TYPE" => PTS_TYPE,
     
"PTS_LINE" => PTS_LINE,
     
"PTS_VERSION" => PTS_VERSION,
-    
"NUM_CPU_CORES" => cpu_core_count(),
-    
"NUM_CPU_JOBS" => cpu_job_count(),
-    
"MEM_CAPACITY" => memory_mb_capacity(),
+    
"SYS_CPU_CORES" => cpu_core_count(),
+    
"SYS_CPU_JOBS" => cpu_job_count(),
+    
"SYS_MEMORY" => memory_mb_capacity(),
+    
"GPU_MEMORY" => graphics_memory_capacity(),
     
"SCREEN_WIDTH" => current_screen_width(),
     
"SCREEN_HEIGHT" => current_screen_height(),
     
"OS" => os_vendor(),
diff --git a/pts-core/functions/pts-functions_linux.php b/pts-core/functions/pts-functions_linux.php
index 61b6004
..17acf36 100644
--- a/pts-core/functions/pts-functions_linux.php
+++ b/pts-core/functions/pts-functions_linux.php
@@ -200,+200,25 @@ function graphics_subsystem_version()

     return 
$info;
 }
+function 
graphics_memory_capacity()
+{
+    
// Attempt NVIDIA (Binary Driver) Video RAM detection
+    $info shell_exec("nvidia-settings --query [gpu:0]/VideoRam");
+    
$video_ram 128;
+
+    if((
$pos strpos($info"VideoRam")) > 0)
+    {
+        
$info trim(substr($infostrpos($info"):") + 3));
+        
$info trim(substr($info0strpos($info"\n"))); // Double check in case the blob drops period or makes other change
+        $info trim(substr($info0strpos($info".")));
+        
$video_ram intval($info) / 1024;
+    }
+
+    
// Attempt ATI/AMD (Binary Driver) Video RAM detection
+    // TODO
+
+    return 
$video_ram;
+}
 function 
compiler_version()
 {
     
$info shell_exec("gcc -v 2>&1");
<
 
Phoronix.com
Linux Driver Forums
Copyright © 2014 by Phoronix Media