pts-core: Couple minor fixes

This commit is contained in:
Michael Larabel
2024-01-01 15:58:57 -06:00
parent 5177940edb
commit 770b08a804
3 changed files with 12 additions and 5 deletions

View File

@@ -3,8 +3,8 @@
/*
Phoronix Test Suite
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
Copyright (C) 2008 - 2018, Phoronix Media
Copyright (C) 2008 - 2018, Michael Larabel
Copyright (C) 2008 - 2024, Phoronix Media
Copyright (C) 2008 - 2024, Michael Larabel
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -322,7 +322,7 @@ class pts_render
{
$paint_color = '#f1052d';
}
else if(strpos($i, 'intel ') !== false || strpos($i, 'xeon ') !== false || strpos($i, 'core i') !== false || strpos($i, 'pentium') !== false || strpos($i, 'celeron') !== false)
else if(strpos($i, 'intel ') !== false || strpos($i, 'xeon ') !== false || strpos($i, 'core i') !== false || strpos($i, 'core ultra') !== false || strpos($i, 'pentium') !== false || strpos($i, 'celeron') !== false)
{
$paint_color = '#0b5997';
}

View File

@@ -847,7 +847,10 @@ class pts_test_result
$first_value = pts_arrays::first_element($this->test_result_buffer->buffer_items)->get_result_value();
$last_value = pts_arrays::last_element($this->test_result_buffer->buffer_items)->get_result_value();
//echo 'first: ' . $first_value . ' last: ' . $last_value . '<br />';
if(!is_numeric($first_value) || !is_numeric($last_value))
{
continue;
}
if($this->test_profile->get_result_proportion() == 'HIB')
{
if($last_value < $first_value * (1 - $threshold_level))

View File

@@ -23,6 +23,7 @@
class pts_test_result_parser
{
private static $monitoring_sensors = array();
private static $did_dynamic_append_to_test_args = false;
protected static function gen_result_active_handle(&$root_result, $test_result = null)
{
@@ -450,6 +451,7 @@ class pts_test_result_parser
$definitions = $test_run_request->test_profile->get_results_definition('ResultsParser');
$all_parser_entries = $definitions->get_result_parser_definitions();
$avoid_duplicates = array();
self::$did_dynamic_append_to_test_args = false;
$primary_result = null;
foreach($all_parser_entries as $entry)
{
@@ -468,9 +470,10 @@ class pts_test_result_parser
if($test_result != false)
{
// Result found
if(in_array($test_result, $avoid_duplicates))
if(in_array($test_result, $avoid_duplicates) && self::$did_dynamic_append_to_test_args == false)
{
// Workaround for some tests like FIO that have test result parsers that could generate duplicates in handling old PTS versions while newer ones have K conversion, etc
pts_test_result_parser::debug_message('Dropping Duplicate Test Result Match: ' . $test_result);
continue;
}
$avoid_duplicates[] = $test_result;
@@ -922,6 +925,7 @@ class pts_test_result_parser
}
$test_run_request->append_to_arguments_description(' - ' . $e->get_append_to_arguments_description());
self::$did_dynamic_append_to_test_args = true;
}
}