1<?php
2
3/*
4	Phoronix Test Suite
5	URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
6	Copyright (C) 2019, Phoronix Media
7	Copyright (C) 2019, Michael Larabel
8
9	This program is free software; you can redistribute it and/or modify
10	it under the terms of the GNU General Public License as published by
11	the Free Software Foundation; either version 3 of the License, or
12	(at your option) any later version.
13
14	This program is distributed in the hope that it will be useful,
15	but WITHOUT ANY WARRANTY; without even the implied warranty of
16	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17	GNU General Public License for more details.
18
19	You should have received a copy of the GNU General Public License
20	along with this program. If not, see <http://www.gnu.org/licenses/>.
21*/
22
23class strict_benchmark implements pts_option_interface
24{
25	const doc_section = 'Testing';
26	const doc_description = 'This option is equivalent to the `benchmark` option except it enables various options to run benchmarks an extended number of times for ensuring better statistical accuracy if enforcing strict controls over the data quality, in some cases running the benchmarks for 20+ times.';
27
28	public static function command_aliases()
29	{
30		return array('test');
31	}
32	public static function argument_checks()
33	{
34		return array(
35		new pts_argument_check('VARIABLE_LENGTH', array('pts_types', 'identifier_to_object'), null)
36		);
37	}
38	public static function run($r)
39	{
40		putenv('FORCE_TIMES_TO_RUN_MULTIPLE=2');
41		putenv('FORCE_MIN_TIMES_TO_RUN=20');
42		putenv('FORCE_MIN_TIMES_TO_RUN_CUTOFF=5');
43		putenv('FORCE_ABSOLUTE_MIN_TIMES_TO_RUN=3');
44		pts_test_installer::standard_install($r);
45		$run_manager = new pts_test_run_manager();
46		$run_manager->standard_run($r);
47	}
48}
49
50?>
51