Summary
Description: Phoronix Test Suite open-source benchmarking development
Last Change: Fri 5/17/13 22:52
Recent Commits
>
--git a/TYDAL-CHANGE-LOG b/TYDAL-CHANGE-LOG
index 1806101..2526f84 100644
--- a/TYDAL-CHANGE-LOG
+++ b/TYDAL-CHANGE-LOG
@@ -18,3 +18,4 @@ Phoronix Test Suite (Git)
- pts-core: Relocate initialization code to be called from phoronix-test-suite.php
- pts-core: Add STATIC_DIR (pts-core/static/) for some static files
- pts-core: Add static/hal-values-remove.txt to contain a list of all HAL strings to remove if found, instead of having it coded within an array
+- pts-core: Add static/info-strings-remove.txt to contain a list of all information strings to remove if found, instead of having it coded within an array
diff --git a/pts-core/functions/pts-functions.php b/pts-core/functions/pts-functions.php
index 41f9814..a59dd66 100644
--- a/pts-core/functions/pts-functions.php
+++ b/pts-core/functions/pts-functions.php
@@ -387,7 +387,14 @@ function pts_bool_question($question, $default = true, $question_id = "UNKNOWN")
function pts_clean_information_string($str)
{
// Clean a string containing hardware information of some common things to change/strip out
- $remove_phrases = array("corporation ", " technologies", ",", " technology", " incorporation", "version ", "computer ", "processor ", "genuine ", "unknown device ", "(r)", "(tm)", "inc. ", "inc ", "/pci/sse2/3dnow!", "/pci/sse2", "co. ltd", "co. ltd.", "limited.", "memory controller", "northbridge only dual slot pci-e_gfx and ht3 k8 part", "northbridge only dual slot pci-e_gfx and ht1 k8 part", "host bridge", "dram controller");
+ static $remove_phrases = null;
+
+ if(empty($remove_phrases) && is_file(STATIC_DIR . "info-strings-remove.txt"))
+ {
+ $word_file = trim(file_get_contents(STATIC_DIR . "info-strings-remove.txt"));
+ $remove_phrases = array_map("trim", explode("\n", $word_file));
+ }
+
$str = str_ireplace($remove_phrases, " ", $str);
$change_phrases = array("Memory Controller Hub" => "MCH", "Advanced Micro Devices" => "AMD", "MICRO-STAR INTERNATIONAL" => "MSI", "Silicon Integrated Systems" => "SiS", "Integrated Graphics Controller" => "IGP");
diff --git a/pts-core/static/info-strings-remove.txt b/pts-core/static/info-strings-remove.txt
new file mode 100644
index 0000000..eef684e
--- /dev/null
+++ b/pts-core/static/info-strings-remove.txt
@@ -0,0 +1,24 @@
+incorporation
+corporation
+technologies
+technology
+version
+computer
+processor
+host bridge
+dram controller
+memory controller
+northbridge only dual slot pci-e_gfx and ht3 k8 part
+northbridge only dual slot pci-e_gfx and ht1 k8 part
+genuine
+unknown device
+/pci/sse2/3dnow!
+/pci/sse2
+limited.
+co. ltd.
+co. ltd
+(r)
+(tm)
+inc.
+inc
+,
<
Copyright © 2013 by Phoronix Media