Summary
Description: Phoronix Test Suite open-source benchmarking development
Last Change: Fri 5/17/13 22:52
Recent Commits
>
--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,9 +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,6 +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($info, strpos($info, "):") + 3));
+ $info = trim(substr($info, 0, strpos($info, "\n"))); // Double check in case the blob drops period or makes other change
+ $info = trim(substr($info, 0, strpos($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");
<
Copyright © 2013 by Phoronix Media