Compare commits
290 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7ff93a1d66 | ||
|
|
990ba0fa9a | ||
|
|
64e206c2fc | ||
|
|
00ddc171b4 | ||
|
|
c756f3b1a0 | ||
|
|
702fec9522 | ||
|
|
b600571d84 | ||
|
|
b3fdeda463 | ||
|
|
e4d93b2243 | ||
|
|
fbc7dd50a0 | ||
|
|
58a1ccb636 | ||
|
|
182567d450 | ||
|
|
0709212c2d | ||
|
|
086381523a | ||
|
|
5fd4223f6e | ||
|
|
bbd0cb619c | ||
|
|
304f505f05 | ||
|
|
78bed5da9e | ||
|
|
85da3d6e8d | ||
|
|
5a32573cbb | ||
|
|
37107776ef | ||
|
|
f5b89d3cf1 | ||
|
|
624adbdf89 | ||
|
|
c9bbbace0e | ||
|
|
4e02d9e939 | ||
|
|
4531b1a311 | ||
|
|
4869117ea1 | ||
|
|
8ef44f39ba | ||
|
|
5080889641 | ||
|
|
7a97676f26 | ||
|
|
ae23ae31c3 | ||
|
|
47aeaec6f6 | ||
|
|
3046cf66bb | ||
|
|
bd650ba3db | ||
|
|
ba0bba8769 | ||
|
|
f8b6b2d584 | ||
|
|
9888299c16 | ||
|
|
91a96a32b6 | ||
|
|
045490d5c0 | ||
|
|
e02a9f5eaf | ||
|
|
0d37d88559 | ||
|
|
1fe7d73f34 | ||
|
|
b0d1b4ff5c | ||
|
|
2769754f5e | ||
|
|
79ea58730d | ||
|
|
d94dfd6169 | ||
|
|
0a7b4d5423 | ||
|
|
4074e5d4c4 | ||
|
|
50c5f3c193 | ||
|
|
6bd3254801 | ||
|
|
3e2de2cac0 | ||
|
|
dfee1b90e0 | ||
|
|
97a6b9b55d | ||
|
|
e6586ef03d | ||
|
|
2ac4c5f60f | ||
|
|
f4586a373c | ||
|
|
3ff688305a | ||
|
|
48cfbac015 | ||
|
|
1cd0bf5212 | ||
|
|
49b71a4691 | ||
|
|
5a1fff5da5 | ||
|
|
ece93f0aa3 | ||
|
|
d5db3fdf01 | ||
|
|
5952329acc | ||
|
|
b5981d5250 | ||
|
|
b4633c3414 | ||
|
|
1c2864df81 | ||
|
|
4eabcf3dd3 | ||
|
|
1c2f697c1a | ||
|
|
4744ba344f | ||
|
|
66a6578e9d | ||
|
|
66e0cb4bec | ||
|
|
e2d23b0069 | ||
|
|
ee93f50b14 | ||
|
|
7bc9916d58 | ||
|
|
e3c4f2a647 | ||
|
|
85e633e712 | ||
|
|
01c94ee0a0 | ||
|
|
ee92e4ae0b | ||
|
|
10a227a316 | ||
|
|
d52f7cce38 | ||
|
|
8444b1abee | ||
|
|
dcb73373da | ||
|
|
061c2702a1 | ||
|
|
44dc6854b3 | ||
|
|
6f71005e3e | ||
|
|
a4e184d3e6 | ||
|
|
6d62e7399c | ||
|
|
cbbbc374a1 | ||
|
|
e2311cda3d | ||
|
|
9c128102cd | ||
|
|
bb5579125d | ||
|
|
2fb50776e3 | ||
|
|
6859349ffa | ||
|
|
16cb6b4f51 | ||
|
|
64eeb16aa4 | ||
|
|
223b982f21 | ||
|
|
3ee52f05d1 | ||
|
|
3bf1b1eb87 | ||
|
|
b8deb67d6b | ||
|
|
6bf5e66148 | ||
|
|
f662ba06e3 | ||
|
|
461ab86712 | ||
|
|
8060219473 | ||
|
|
07117dacfc | ||
|
|
f6951e081a | ||
|
|
973995b48e | ||
|
|
c40a740556 | ||
|
|
002461378c | ||
|
|
2a56f62e07 | ||
|
|
4f8f117259 | ||
|
|
a9811c3c9b | ||
|
|
295e130871 | ||
|
|
31b9534706 | ||
|
|
362c39a8e4 | ||
|
|
82662be6b8 | ||
|
|
0003dbf4e3 | ||
|
|
77f9ce6d8e | ||
|
|
08c9933529 | ||
|
|
2f9d47d2c0 | ||
|
|
baf0f7739c | ||
|
|
eb890889f5 | ||
|
|
5fdb6c25d3 | ||
|
|
a16c5597ad | ||
|
|
e6bb62d362 | ||
|
|
9cb64d8227 | ||
|
|
204c4d2466 | ||
|
|
f75b627ced | ||
|
|
93d0d75ad7 | ||
|
|
3b90098dac | ||
|
|
46780545b0 | ||
|
|
2e7773d3c5 | ||
|
|
fcac72a562 | ||
|
|
3eb47951c6 | ||
|
|
cf9d258806 | ||
|
|
866525e0ab | ||
|
|
6c4ad0668b | ||
|
|
408bc912a4 | ||
|
|
e3c6ad0636 | ||
|
|
e0df079101 | ||
|
|
b290788913 | ||
|
|
db794375c2 | ||
|
|
022c8193ca | ||
|
|
c691b19641 | ||
|
|
3e4526905a | ||
|
|
4d058991d1 | ||
|
|
14ca2576d2 | ||
|
|
4814c5cbc9 | ||
|
|
d3d9afc01a | ||
|
|
7be38ee32b | ||
|
|
2d58d8e053 | ||
|
|
57f2f985ca | ||
|
|
20e87f7738 | ||
|
|
094e1b8abb | ||
|
|
82823ad1c9 | ||
|
|
8ae57801c8 | ||
|
|
90fb1ddada | ||
|
|
b80825290c | ||
|
|
1dd29eee20 | ||
|
|
1c48032568 | ||
|
|
667ff28134 | ||
|
|
52dd9c7e4e | ||
|
|
ff2f6659bc | ||
|
|
2c07a48dad | ||
|
|
3c0a070663 | ||
|
|
afa3efa604 | ||
|
|
7d603bff85 | ||
|
|
fe6991a9f9 | ||
|
|
ef35e7f06e | ||
|
|
6bb8dbca7f | ||
|
|
c7c2dec295 | ||
|
|
d703559f39 | ||
|
|
355e107382 | ||
|
|
a74f7eb6e0 | ||
|
|
3f90403975 | ||
|
|
0a41974c80 | ||
|
|
caa2329926 | ||
|
|
29b94c8dd2 | ||
|
|
805885a58e | ||
|
|
fbc96a8bdf | ||
|
|
d1e1dd8c03 | ||
|
|
cb09c5e508 | ||
|
|
9490bc9721 | ||
|
|
f36f8db8ba | ||
|
|
2e24e720e4 | ||
|
|
793f76c6d7 | ||
|
|
4c9001a1dc | ||
|
|
d4152606c9 | ||
|
|
ad28eadc4a | ||
|
|
835f3e6868 | ||
|
|
c6e5e54088 | ||
|
|
c6c8f9261a | ||
|
|
9435ebd78f | ||
|
|
1bd6e6f952 | ||
|
|
e3f5ec1c0a | ||
|
|
452d9ed04c | ||
|
|
05b3fdf890 | ||
|
|
a7fab960a1 | ||
|
|
6b5e8df4e3 | ||
|
|
f6356c4a27 | ||
|
|
027f7e84bb | ||
|
|
eaa7431823 | ||
|
|
088a710bcd | ||
|
|
b717fa9582 | ||
|
|
f456fcb084 | ||
|
|
12f3d80f39 | ||
|
|
0bd0dee4d4 | ||
|
|
5df5624c2a | ||
|
|
571102774c | ||
|
|
1554c1804c | ||
|
|
146fff9de6 | ||
|
|
2f183c8100 | ||
|
|
be85bb3466 | ||
|
|
ffbe0513e9 | ||
|
|
4bf1a781b7 | ||
|
|
41759ab9ef | ||
|
|
02f4d29d16 | ||
|
|
d286f89f92 | ||
|
|
cf8e834598 | ||
|
|
3902d680be | ||
|
|
1ec7a10523 | ||
|
|
8afd4eb3ce | ||
|
|
f01ba250c2 | ||
|
|
56ca809504 | ||
|
|
8331cf461e | ||
|
|
eb4e073f80 | ||
|
|
1f10bf12e3 | ||
|
|
568bbf124a | ||
|
|
7955d58335 | ||
|
|
b74049cbf4 | ||
|
|
a60d870932 | ||
|
|
38f0f3eb6b | ||
|
|
655100774f | ||
|
|
1f6c7b7fa4 | ||
|
|
f410ada612 | ||
|
|
ba3203de8d | ||
|
|
68f34c22ff | ||
|
|
6c8067a20b | ||
|
|
50d8cdc3fb | ||
|
|
93325244c4 | ||
|
|
257ed8b89f | ||
|
|
3ad38b6939 | ||
|
|
f575d21074 | ||
|
|
049b759f10 | ||
|
|
c6f48b95c5 | ||
|
|
ee04d64563 | ||
|
|
0a645235a6 | ||
|
|
95e6d0d01b | ||
|
|
ae9b7b1621 | ||
|
|
3b7e3c7e70 | ||
|
|
e54b418ef2 | ||
|
|
9bafbd7195 | ||
|
|
87a90709f7 | ||
|
|
30eb45846a | ||
|
|
2b93102268 | ||
|
|
03029d5be5 | ||
|
|
19914d4577 | ||
|
|
78de8c6b7b | ||
|
|
e77df95389 | ||
|
|
b016dd899b | ||
|
|
79d8fcd41e | ||
|
|
a5f28439e6 | ||
|
|
3747113313 | ||
|
|
c01a9b010e | ||
|
|
56aa7199c3 | ||
|
|
0fc8b88b30 | ||
|
|
5c0c048e81 | ||
|
|
9f2a7b3201 | ||
|
|
42069d2df7 | ||
|
|
7454652df9 | ||
|
|
acc90e44f1 | ||
|
|
14a49bc295 | ||
|
|
a789c44b74 | ||
|
|
0f6f2a4a57 | ||
|
|
edbb31e8ed | ||
|
|
9766cd1993 | ||
|
|
87be9c54d1 | ||
|
|
4078ffd39a | ||
|
|
6e6fbd97a5 | ||
|
|
0e707d0bf3 | ||
|
|
22232f9cec | ||
|
|
e8677218bb | ||
|
|
943affd275 | ||
|
|
cb4f09282b | ||
|
|
d2e8ffc29a | ||
|
|
2b2978b724 | ||
|
|
43c8759f85 | ||
|
|
3567d78b32 | ||
|
|
2fc399d738 | ||
|
|
2f29f6bf3f |
2
AUTHORS
2
AUTHORS
@@ -1,4 +1,4 @@
|
||||
Copyright 2008 - 2018 by Phoronix Media.
|
||||
Copyright 2008 - 2019 by Phoronix Media.
|
||||
|
||||
Lead Architects:
|
||||
|
||||
|
||||
117
ChangeLog
117
ChangeLog
@@ -1,5 +1,122 @@
|
||||
PHORONIX TEST SUITE CHANGE-LOG
|
||||
|
||||
Phoronix Test Suite 8.6.1-Spydeberg
|
||||
21 February 2019
|
||||
|
||||
pts-core: Dynamically honoring the CLI terminal width (no longer cache the value on Linux/BSD/macOS)
|
||||
pts-core: BSD external dependency updates
|
||||
ob_auto_compare: Minor formatting updates
|
||||
|
||||
Phoronix Test Suite 8.6.0-Spydeberg
|
||||
5 February 2019
|
||||
|
||||
pts-core: Other small tweaks and fixes
|
||||
pts-core: Fix for "/installed" virtual suite not including the proprietary/commercial tests that are installed
|
||||
ob_auto_compare: Allow showing more results in the embedded percentile graphs
|
||||
|
||||
Phoronix Test Suite 8.6.0 Milestone 3
|
||||
27 January 2019
|
||||
|
||||
pts-core: Better handling on Windows when there are space(s) in the paths
|
||||
pts-core: Add __event_post_run_stats module hook
|
||||
pts-core: Inline display of result distributions from OpenBenchmarking.org on applicable results
|
||||
pts-core: Don't try to run tests from result file(s) or suite(s) that were not installed
|
||||
pts-core: More accurate time reporting when result files are passed to `phoronix-test-suite estimate-run-time`
|
||||
phodevi: Better reporting of NVMe drive strings on BSDs
|
||||
|
||||
Phoronix Test Suite 8.6.0 Milestone 2
|
||||
19 January 2019
|
||||
|
||||
pts-core: Update Mac OS X to macOS references
|
||||
pts-core: Add result-file-stats sub-command to show more test result statistics
|
||||
pts-core: Show geometric mean and harmonic mean data at end of benchmarking process when relevant as part of post-run stats
|
||||
pts-core: Improved formatting of file download text user interface for downloading of dependencies on Microsoft Windows
|
||||
pts-core: Fix Loop 'Test i of n' Reporting
|
||||
pts-core: A few warning fixes for PHP 7.3+
|
||||
pts-core: External dependency handling support for OpenMandriva Lx 4.0 (transitioned from urpmi to DNF)
|
||||
phodevi: Report Windows Subsystem for Linux (WSL) to the system layer string
|
||||
|
||||
Phoronix Test Suite 8.6.0 Milestone 1
|
||||
7 January 2019
|
||||
|
||||
pts-core: No longer clear test profile identifiers on secondary saved results
|
||||
pts-core: Add compare-results-to-baseline sub-command for comparing one result file (baseline) against a set of results for text look at relative perf
|
||||
pts-core: Minor fixes
|
||||
pts-core: Show wins and losses summary after testing on large result files
|
||||
pts-core: On two-way result files, after test completion show comparison of current result against previous result (baseline)
|
||||
pts-core: Add ShowPostRunStatistics user configuration XML option to toggle whether various test statistics are printed at the end of testing
|
||||
pts-core: Add recently-added-tests sub-command to show newly added test profiles / alternative to openbenchmarking-changes/recently-updated-tests
|
||||
pts-core: Allow outputting line graphs to terminal interface as basic box plot graphs
|
||||
phodevi: Improve Linux multiple network device reporting
|
||||
phodevi: LXQt desktop version reporting
|
||||
phodevi: Update for Microsoft Windows Server 2019
|
||||
system_monitor: Allow outputting system monitor graphs to terminal interface inline
|
||||
|
||||
Phoronix Test Suite 8.4.1-Skiptvet
|
||||
9 December 2018
|
||||
|
||||
pts-core: Workaround for RHEL 7.6 PHP having buggy CURL that is causing seg faults
|
||||
pts-core: Ensure "." doesn't get set in PATH when launching phoronix-test-suite
|
||||
pts-core: Allow PRESET_OPTIONS env var to be used when in batch mode
|
||||
pts-core: FreeBSD updates
|
||||
pts-core: Add PRESET_OPTIONS_VALUES environment variable that is similar to PRESET_OPTIONS but for explicit values
|
||||
phodevi: Improved Radeon AMDGPU frequency detection/reporting
|
||||
phodevi: Add support for reading GPU usage sensor with AMDGPU gpu_busy_percent sysfs interface
|
||||
phodevi: Updated gpu_voltage sensor for AMDGPU driver
|
||||
phodevi: Updated gpu_power sensor for AMDGPU driver
|
||||
phodevi: Updated gpu_fanspeed sensor for AMDGPU driver
|
||||
phodevi: Updated gpu_freq sensor for AMDGPU driver
|
||||
phodevi: Improved physical CPU core detection on DragonFlyBSD 5.4
|
||||
phodevi: Improved Spectre detection on DragonFlyBSD 5.4
|
||||
phodevi: Allow using NUM_CPU_CORES to override the number of exposed CPU threads/cores to tests (alternative to PTS_NPROC / NUMBER_OF_PROCESSORS)
|
||||
phodevi: Improved multi-disk reporting for non-Linux operating systems
|
||||
phodevi: Minor GPU string reporting improvement
|
||||
|
||||
Phoronix Test Suite 8.4.0-Skiptvet
|
||||
26 November 2018
|
||||
|
||||
phodevi: Various minor tweaks
|
||||
|
||||
Phoronix Test Suite 8.4.0 Milestone 3
|
||||
20 November 2018
|
||||
|
||||
pts-core: Various external dependency updates
|
||||
pts-core: Expose NUM_CPU_PHYSICAL_CORES to test profiles as alternative to NUM_CPU_CORES (logical count)
|
||||
pts-core: Fix possible situation of openbenchmarking-refresh not updating when IndexCacheTTL is set to 0
|
||||
pts-core: Allow branded colors to work in the terminal/CLI text graphs
|
||||
pts-core: Continued POWER9 support improvements
|
||||
pts-core: Add RemoveInstallDirectoryOnReinstall to toggle test re-installation behavior
|
||||
pts_Graph: Fix for sometimes tick marker text overlapping
|
||||
phodevi: Improved physical CPU core detection for architectures like POWER
|
||||
phodevi: Improved CPU cache size detection
|
||||
|
||||
Phoronix Test Suite 8.4.0 Milestone 2
|
||||
5 November 2018
|
||||
|
||||
pts-core: Allow passing PTS environment variables as arguments to PTS and then just have PTS set them in the environment
|
||||
pts-core: Add dry-run test option
|
||||
pts-core: Various result parser additions to help parsing of CSV frame-time data for more test profiles (games)
|
||||
phodevi: Vulkan driver reporting fix
|
||||
|
||||
Phoronix Test Suite 8.4.0 Milestone 1
|
||||
8 October 2018
|
||||
|
||||
phodevi: Report vRAM size on GPU model string in GB when over 1GB
|
||||
pts-core: At run-time also report if test is deprecated/broken
|
||||
pts-core: Add "node-npm" as an external dependency for Node.js + NPM
|
||||
phodevi: Drop information reporting support for the long ago Catalyst/fglrx driver stack that hasn't been supported/maintained in many years
|
||||
|
||||
Phoronix Test Suite 8.2.0-Rakkestad
|
||||
11 September 2018
|
||||
|
||||
pts-core: Add RequiresDisplay test profile property to indicate if the test profile explicitly requires a monitor / display server to work
|
||||
pts-core: Add RequiresNetwork test profile property to indicate if the test profile needs a working network connection
|
||||
pts-core: Add RequiresInternet test profile property to indicate if the test profile needs a working Internet connection
|
||||
pts-core: Don't install tests where the current run-time checks will fail
|
||||
phodevi: Improve CPU thread count detection when running under LXC
|
||||
phodevi: More robust DMI decode ignore value handling
|
||||
phodevi: Add extra fallback detection for LXC in system-layer
|
||||
|
||||
Phoronix Test Suite 8.2.0 Milestone 4
|
||||
7 September 2018
|
||||
|
||||
|
||||
29
README.md
29
README.md
@@ -1,13 +1,13 @@
|
||||
# Phoronix Test Suite 8.2.0m4
|
||||
http://www.phoronix-test-suite.com/
|
||||
# Phoronix Test Suite 8.6.1
|
||||
https://www.phoronix-test-suite.com/
|
||||
|
||||
The **Phoronix Test Suite** is the most comprehensive testing and benchmarking
|
||||
platform available for Linux, Solaris, OS X, and BSD operating systems. The
|
||||
Phoronix Test Suite allows for carrying out tests in a fully automated manner
|
||||
from test installation to execution and reporting. All tests are meant to be
|
||||
easily reproducible, easy-to-use, and support fully automated execution. The
|
||||
Phoronix Test Suite is open-source under the GNU GPLv3 license and is developed
|
||||
by Phoronix Media in cooperation with partners.
|
||||
platform available for Linux, Solaris, macOS, Windows, and BSD operating
|
||||
systems. The Phoronix Test Suite allows for carrying out tests in a fully
|
||||
automated manner from test installation to execution and reporting. All tests
|
||||
are meant to be easily reproducible, easy-to-use, and support fully automated
|
||||
execution. The Phoronix Test Suite is open-source under the GNU GPLv3 license
|
||||
and is developed by Phoronix Media in cooperation with partners.
|
||||
|
||||
The Phoronix Test Suite itself is an open-source framework for conducting
|
||||
automated tests along with reporting of test results, detection of installed
|
||||
@@ -50,13 +50,12 @@ the Phoronix Test Suite website.
|
||||
|
||||
## Installation & Setup
|
||||
|
||||
The Phoronix Test Suite is supported on Linux, *BSD, Solaris, Mac OS X, and
|
||||
Windows systems. However, the most full-featured and well supported operating
|
||||
system for conducting the tests is Linux with some non-basic functionality not
|
||||
being available under all platforms. The Phoronix Test Suite software/framework
|
||||
is compatible with all major CPU architectures (e.g. i686, x86_64, ARM,
|
||||
PowerPC), but not all of the test profiles/suites are compatible with all
|
||||
architectures.
|
||||
The Phoronix Test Suite is supported on Linux, *BSD, Solaris, macOS, and Windows
|
||||
systems. However, the most full-featured and well supported operating system for
|
||||
conducting the tests is Linux with some non-basic functionality not being
|
||||
available under all platforms. The Phoronix Test Suite software/framework is
|
||||
compatible with all major CPU architectures (e.g. i686, x86_64, ARM, PowerPC),
|
||||
but not all of the test profiles/suites are compatible with all architectures.
|
||||
|
||||
The Phoronix Test Suite can be installed for system-wide usage or run locally
|
||||
without installation from the extracted tar.gz/zip package. The only hard
|
||||
|
||||
@@ -32,14 +32,11 @@ PHORONIX TEST SUITE PUBLIC TODO LIST:
|
||||
- QMC Beaver [http://qmcbeaver.sourceforge.net/]
|
||||
- Some potential interesting GPGPU tests [http://www.bealto.com/gpu-benchmarks.html]
|
||||
- WebGL / Chrome Test [http://phoronix.com/forums/showthread.php?73167-Some-Benchmarks-to-add-to-PTS-WebGL-and-Google-Chrome]
|
||||
- GtkPerf improvements [http://phoronix.com/forums/showthread.php?73047-gtkperf-I-m-maintaining-feature-requests-new-tests]
|
||||
- SIPP [http://sipp.sourceforge.net/]
|
||||
- oclGaussCrack [https://hashcat.net/oclGaussCrack/]
|
||||
- http://hashcat.net/oclhashcat/
|
||||
- Handbrake [http://handbrake.fr/]
|
||||
- libMicro [https://github.com/portante/libMicro]
|
||||
- http://markjstock.org/pages/rad_bench.html
|
||||
- https://code.google.com/p/pyrit/
|
||||
- https://github.com/acangiano/ruby-benchmark-suite
|
||||
- http://www.nwchem-sw.org/index.php/Compiling_NWChem
|
||||
- http://sourceforge.net/projects/ffsb/
|
||||
@@ -60,6 +57,29 @@ PHORONIX TEST SUITE PUBLIC TODO LIST:
|
||||
- suitesparse http://faculty.cse.tamu.edu/davis/suitesparse.html
|
||||
- ospray/ospray
|
||||
- Microsoft/X-Mem
|
||||
- https://www2.mrc-lmb.cam.ac.uk/relion/index.php?title=Benchmarks_%26_computer_hardware
|
||||
- kripke
|
||||
- nekbone
|
||||
- https://github.com/u39kun/deep-learning-benchmark
|
||||
- AMG
|
||||
- CORAL-2 benchmarks
|
||||
- CompuBench (Windows)
|
||||
https://github.com/cart/amethyst-bunnymark
|
||||
rav1e (not yet multithreaded as of Oct 2018)
|
||||
gnzlbg/aobench
|
||||
https://github.com/mpicbg-scicomp/gearshifft
|
||||
https://github.com/hyperledger/caliper
|
||||
dav1d
|
||||
RedShift demo
|
||||
https://wiki.fysik.dtu.dk/gpaw/devel/benchmarks.html
|
||||
- More AV1 IVF sample files: http://download.opencontent.netflix.com/?prefix=AV1/Chimera/
|
||||
SPECFEM3D https://www.nvidia.com/en-us/data-center/gpu-accelerated-applications/specfem3d-globe/
|
||||
Ashes of the Singularity Escalation (January 2019 black screen)
|
||||
hitman2 on steam play benchmarks nicely but no sign of benchmark logs
|
||||
shadow of the tomb raider, can't figure out any CLI switches
|
||||
- https://code.google.com/p/pyrit/ pyrit opencl benchmark
|
||||
filebench
|
||||
flowgrind
|
||||
|
||||
### WEB SOCKET / HTML5 USER INTERFACE WORK ###
|
||||
|
||||
@@ -74,4 +94,4 @@ PHORONIX TEST SUITE PUBLIC TODO LIST:
|
||||
- Implement the complementary WebSocket communication to HTTP pulls
|
||||
- Ensure sane validating of more user input / resource uploads
|
||||
- Hook up TriggerTarget for allowing event.php to optionally specify a sub-set of systems/groups to target for a given trigger
|
||||
- Clean up the code and modularize more of the code into functions
|
||||
- Clean up the code and modularize more of the code
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.TH phoronix-test-suite 1 "www.phoronix-test-suite.com" "8.2.0m4"
|
||||
.TH phoronix-test-suite 1 "www.phoronix-test-suite.com" "8.6.1"
|
||||
.SH NAME
|
||||
phoronix-test-suite \- The Phoronix Test Suite is an extensible open-source platform for performing testing and performance evaluation.
|
||||
.SH SYNOPSIS
|
||||
@@ -6,7 +6,7 @@ phoronix-test-suite \- The Phoronix Test Suite is an extensible open-source plat
|
||||
.br
|
||||
.B phoronix-test-suite benchmark [test | suite]
|
||||
.SH DESCRIPTION
|
||||
The **Phoronix Test Suite** is the most comprehensive testing and benchmarking platform available for Linux, Solaris, OS X, and BSD operating systems. The Phoronix Test Suite allows for carrying out tests in a fully automated manner from test installation to execution and reporting. All tests are meant to be easily reproducible, easy-to-use, and support fully automated execution. The Phoronix Test Suite is open-source under the GNU GPLv3 license and is developed by Phoronix Media in cooperation with partners.
|
||||
The **Phoronix Test Suite** is the most comprehensive testing and benchmarking platform available for Linux, Solaris, macOS, Windows, and BSD operating systems. The Phoronix Test Suite allows for carrying out tests in a fully automated manner from test installation to execution and reporting. All tests are meant to be easily reproducible, easy-to-use, and support fully automated execution. The Phoronix Test Suite is open-source under the GNU GPLv3 license and is developed by Phoronix Media in cooperation with partners.
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
.SH SYSTEM
|
||||
@@ -88,6 +88,9 @@ This option will install the selected test(s) (if needed) and will proceed to ru
|
||||
.B default-run [Test | Suite | OpenBenchmarking ID | Test Result] ...
|
||||
This option will run the selected test(s). The name of the test or suite must be supplied or the OpenBenchmarking.org ID or saved local file name. Multiple arguments can be supplied to run additional tests at the same time and save the results in a suite-like fashion. Unlike the normal run option, the default-run will not prompt the user to select from the available test options but will instead use the default options as automatically set by pts-core or the test profile. Use batch-run to automatically test all of the available options.
|
||||
.TP
|
||||
.B dry-run [Test | Suite | OpenBenchmarking ID | Test Result] ...
|
||||
This option and its arguments pre-set the Phoronix Test Suite batch run mode with enforcing of defaults to not save any results and other behavior intended for a dry/test run. This option is primarily intended for testing/evaluation purposes.
|
||||
.TP
|
||||
.B internal-run [Test | Suite | OpenBenchmarking ID | Test Result] ...
|
||||
This option and its arguments pre-set the Phoronix Test Suite batch run mode with sane values for carrying out benchmarks in a semi-automated manner and without uploading any of the result data to the public OpenBenchmarking.org.
|
||||
.TP
|
||||
@@ -116,6 +119,9 @@ This option will list the OpenBenchmarking.org repositories currently linked to
|
||||
.B openbenchmarking-uploads
|
||||
This option will list any recent test result uploads from the system's IP address to OpenBenchmarking.org.
|
||||
.TP
|
||||
.B recently-added-tests
|
||||
This option will list the most recently added (newest) test profiles.
|
||||
.TP
|
||||
.B upload-result [Test Result]
|
||||
This option is used for uploading a test result to OpenBenchmarking.org.
|
||||
.TP
|
||||
@@ -218,6 +224,9 @@ This option will generate a candlestick graph showing the distribution of result
|
||||
.B auto-sort-result-file [Test Result]
|
||||
This option is used if you wish to automatically attempt to sort the results by their result identifier string.
|
||||
.TP
|
||||
.B compare-results-to-baseline [Test Result] [Test Result]
|
||||
This option will allows you to specify a result as a baseline (first parameter) and a second result file (second parameter) that will offer some analysis for showing how the second result compares to the first in matching tests.
|
||||
.TP
|
||||
.B edit-result-file [Test Result]
|
||||
This option is used if you wish to edit the title and description of an existing result file.
|
||||
.TP
|
||||
@@ -245,6 +254,9 @@ This option is used if you wish to change the name of the saved name of a result
|
||||
.B reorder-result-file [Test Result]
|
||||
This option is used if you wish to manually change the order in which test results are shown in the Phoronix Test Suite Results Viewer and the contained graphs. The user must specify a saved results file and then they will be prompted to select the results identifiers one at a time in the order they would like them to be displayed from left to right.
|
||||
.TP
|
||||
.B result-file-stats [Test Result]
|
||||
This option is used if you wish to analyze a result file by seeing various statistics on the result data for result files containing at least two sets of data.
|
||||
.TP
|
||||
.B result-file-to-csv [Test Result]
|
||||
This option will read a saved test results file and output the system hardware and software information along with the results to a CSV output. The CSV (Comma Separated Values) output can then be loaded into a spreadsheet for easy viewing.
|
||||
.TP
|
||||
@@ -260,7 +272,7 @@ This option will read a saved test results file and output the system hardware a
|
||||
.B show-result [Test Result]
|
||||
Open up the test results in the Phoronix Test Suite Result Viewer or on OpenBenchmarking.org.
|
||||
.TP
|
||||
.B winners-and-losers [Test Result]
|
||||
.B wins-and-losses [Test Result]
|
||||
This option is used if you wish to analyze a result file to see which runs produced the most wins/losses of those result identifiers in the saved file.
|
||||
.TP
|
||||
.SH OTHER
|
||||
@@ -328,15 +340,15 @@ _
|
||||
.SH SEE ALSO
|
||||
.B Websites:
|
||||
.br
|
||||
http://www.phoronix-test-suite.com/
|
||||
https://www.phoronix-test-suite.com/
|
||||
.br
|
||||
http://commercial.phoronix-test-suite.com/
|
||||
https://commercial.phoronix-test-suite.com/
|
||||
.br
|
||||
http://www.openbenchmarking.org/
|
||||
https://www.openbenchmarking.org/
|
||||
.br
|
||||
http://www.phoronix.com/
|
||||
https://www.phoronix.com/
|
||||
.br
|
||||
http://www.phoronix.com/forums/
|
||||
https://www.phoronix.com/forums/
|
||||
.SH AUTHORS
|
||||
Copyright 2008 - 2018 by Phoronix Media, Michael Larabel.
|
||||
Copyright 2008 - 2019 by Phoronix Media, Michael Larabel.
|
||||
.TP
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -2,7 +2,7 @@
|
||||
# Getting Started
|
||||
|
||||
## Overview
|
||||
The Phoronix Test Suite is the most comprehensive testing and benchmarking platform available for Linux, Solaris, Mac OS X, and BSD operating systems. The Phoronix Test Suite allows for carrying out tests in a fully automated manner from test installation to execution and reporting. All tests are meant to be easily reproducible, easy-to-use, and support fully automated execution. The Phoronix Test Suite is open-source under the GNU GPLv3 license and is developed by Phoronix Media in cooperation with partners. Version 1.0 of the Phoronix Test Suite was publicly released in 2008.
|
||||
The Phoronix Test Suite is the most comprehensive testing and benchmarking platform available for Linux, Solaris, macOS, Windows, and BSD operating systems. The Phoronix Test Suite allows for carrying out tests in a fully automated manner from test installation to execution and reporting. All tests are meant to be easily reproducible, easy-to-use, and support fully automated execution. The Phoronix Test Suite is open-source under the GNU GPLv3 license and is developed by Phoronix Media in cooperation with partners. Version 1.0 of the Phoronix Test Suite was publicly released in 2008.
|
||||
The Phoronix Test Suite client itself is a test framework for providing seamless execution of test profiles and test suites. There are more than 200 tests available by default, which are transparently available via [OpenBenchmarking.org](http://openbenchmarking.org/) integration. Of these default test profiles there is a range of sub-systems that can be tested and a range of hardware from mobile devices to desktops and worksrtations/servers. New tests can be easily introduced via the Phoronix Test Suite's extensible test architecture, with test profiles consisting of XML files and shell scripts. Test profiles can produce a quantitative result or other qualitative/abstract results like image quality comparisons and pass/fail. Using Phoronix Test Suite modules, other data can also be automatically collected at run-time such as the system power consumption, disk usage, and other software/hardware sensors. Test suites contain references to test profiles to execute as part of a set or can also reference other test suites. Test suites are defined via an XML schema.
|
||||
Running the Phoronix Test Suite for the first time can be as simple as issuing a command such as *phoronix-test-suite benchmark c-ray* , which would proceed to install a simple CPU test, execute the test, and report the results. Along with the results, the system's hardware/software information is collected in a detailed manner, relevant system logs, and other important system attributes such as compiler flags and system state. Users can optionally upload their results to OpenBenchmarking.org for sharing results with others, comparing results against other systems, and to carry out further analysis.
|
||||
|
||||
@@ -77,6 +77,8 @@ This option is used to configure the batch mode options for the Phoronix Test Su
|
||||
This option will install the selected test(s) (if needed) and will proceed to run the test(s) in the defaults mode. This option is equivalent to running phoronix-test-suite with the install option followed by the default-run option.
|
||||
#### default-run [Test | Suite | OpenBenchmarking ID | Test Result] ...
|
||||
This option will run the selected test(s). The name of the test or suite must be supplied or the OpenBenchmarking.org ID or saved local file name. Multiple arguments can be supplied to run additional tests at the same time and save the results in a suite-like fashion. Unlike the normal run option, the default-run will not prompt the user to select from the available test options but will instead use the default options as automatically set by pts-core or the test profile. Use batch-run to automatically test all of the available options.
|
||||
#### dry-run [Test | Suite | OpenBenchmarking ID | Test Result] ...
|
||||
This option and its arguments pre-set the Phoronix Test Suite batch run mode with enforcing of defaults to not save any results and other behavior intended for a dry/test run. This option is primarily intended for testing/evaluation purposes.
|
||||
#### internal-run [Test | Suite | OpenBenchmarking ID | Test Result] ...
|
||||
This option and its arguments pre-set the Phoronix Test Suite batch run mode with sane values for carrying out benchmarks in a semi-automated manner and without uploading any of the result data to the public OpenBenchmarking.org.
|
||||
|
||||
@@ -97,6 +99,8 @@ This option is used for refreshing the stored OpenBenchmarking.org repostory inf
|
||||
This option will list the OpenBenchmarking.org repositories currently linked to this Phoronix Test Suite client instance.
|
||||
#### openbenchmarking-uploads
|
||||
This option will list any recent test result uploads from the system's IP address to OpenBenchmarking.org.
|
||||
#### recently-added-tests
|
||||
This option will list the most recently added (newest) test profiles.
|
||||
#### upload-result [Test Result]
|
||||
This option is used for uploading a test result to OpenBenchmarking.org.
|
||||
#### upload-test-profile
|
||||
@@ -169,6 +173,8 @@ This option can be used for validating a Phoronix Test Suite test suite as being
|
||||
This option will generate a candlestick graph showing the distribution of results from all trial runs. The candlestick graph is similar to the Japanese candlestick charts used by the financial industry, except instead of representing stock data it is numerical result data from all trial runs.\n\nThe tip of the upper-wick represents the highest value of the test runs with the tip of the lower-wick representing the lowest value of all test runs. The upper-edge of the candle body represents the first or last run value and the lower-edge represents the first or last run value. Lastly, if the last run value is less than the first run value, the candle body is the same color as the graph background, otherwise the last run value is greater.
|
||||
#### auto-sort-result-file [Test Result]
|
||||
This option is used if you wish to automatically attempt to sort the results by their result identifier string.
|
||||
#### compare-results-to-baseline [Test Result] [Test Result]
|
||||
This option will allows you to specify a result as a baseline (first parameter) and a second result file (second parameter) that will offer some analysis for showing how the second result compares to the first in matching tests.
|
||||
#### edit-result-file [Test Result]
|
||||
This option is used if you wish to edit the title and description of an existing result file.
|
||||
#### extract-from-result-file [Test Result]
|
||||
@@ -187,6 +193,8 @@ This option is used if you wish to change the name of the identifier in a test r
|
||||
This option is used if you wish to change the name of the saved name of a result file.
|
||||
#### reorder-result-file [Test Result]
|
||||
This option is used if you wish to manually change the order in which test results are shown in the Phoronix Test Suite Results Viewer and the contained graphs. The user must specify a saved results file and then they will be prompted to select the results identifiers one at a time in the order they would like them to be displayed from left to right.
|
||||
#### result-file-stats [Test Result]
|
||||
This option is used if you wish to analyze a result file by seeing various statistics on the result data for result files containing at least two sets of data.
|
||||
#### result-file-to-csv [Test Result]
|
||||
This option will read a saved test results file and output the system hardware and software information along with the results to a CSV output. The CSV (Comma Separated Values) output can then be loaded into a spreadsheet for easy viewing.
|
||||
#### result-file-to-json [Test Result]
|
||||
@@ -197,7 +205,7 @@ This option will read a saved test results file and output the system hardware a
|
||||
This option will read a saved test results file and output the system hardware and software information to the terminal. The test results are also outputted.
|
||||
#### show-result [Test Result]
|
||||
Open up the test results in the Phoronix Test Suite Result Viewer or on OpenBenchmarking.org.
|
||||
#### winners-and-losers [Test Result]
|
||||
#### wins-and-losses [Test Result]
|
||||
This option is used if you wish to analyze a result file to see which runs produced the most wins/losses of those result identifiers in the saved file.
|
||||
|
||||
## Other
|
||||
@@ -356,7 +364,7 @@ This module utilizes the following environmental variables: WATCHDOG_SENSOR, WAT
|
||||
# Installation Instructions
|
||||
|
||||
## Setup Overview
|
||||
The Phoronix Test Suite supports Linux, Apple Mac OS X, Microsoft Windows, Solaris, Hurd, BSD, and other operating system environments. The only Linux distribution-specific code deals with the external dependencies support feature that are set by individual test profiles. If you are not running one of the supported Linux distributions, Solaris, BSD, or Mac OS X, you may need to install a package manually (as instructed by the Phoronix Test Suite) in order for a test to run. An example of an external dependency would be GCC and the OpenGL Utility Toolkit being needed for test profiles that build an OpenGL benchmark from source-code.
|
||||
The Phoronix Test Suite supports Linux, Apple macOS, Microsoft Windows, Solaris, Hurd, BSD, and other operating system environments. The only Linux distribution-specific code deals with the external dependencies support feature that are set by individual test profiles. If you are not running one of the supported Linux distributions, Solaris, BSD, or macOS, you may need to install a package manually (as instructed by the Phoronix Test Suite) in order for a test to run. An example of an external dependency would be GCC and the OpenGL Utility Toolkit being needed for test profiles that build an OpenGL benchmark from source-code.
|
||||
Among the distributions where the Phoronix Test Suite has been officially tested include Ubuntu, Fedora, Mandriva / Mageia, Gentoo, PCLinuxOS, Arch Linux, Pardus, OpenSuSE, Optware, webOS, Zenwalk, CentOS, Red Hat Enterprise Linux, Oracle Linux, Scientific Linux, Debian, Mint, MEPIS, Alpine Linux, Void Linux, Intel Clear Linux, and Amazon Linux EC2.
|
||||
Among the tested BSD distributions are FreeBSD, PC-BSD, NetBSD, OpenBSD, Debian GNU/kFreeBSD, and DragonflyBSD. Tested Solaris distributions include OpenSolaris, Solaris Express 11, Oracle Solaris 11, OpenIndiana, Illumos, and Nexenta.
|
||||
|
||||
@@ -405,11 +413,9 @@ Running *install-sh* from the root directory of the Phoronix Test Suite will ins
|
||||
|
||||
### Debian/Ubuntu Installation
|
||||
Debian/Ubuntu users are able to follow the Generic Installation instructions or can obtain a Debian Package from the Phoronix Test Suite web-site. The package contains the *phoronix-test-suite* executable in */usr/bin/* , the Phoronix Test Suite files in */usr/share/phoronix-test-suite/* , and the documentation in */usr/share/doc/phoronix-test-suite/* .
|
||||
A phoronix-test-suite package can also be found in the official Ubuntu universe repository beginning with the Ubuntu 9.04 (Jaunty) release, but it may be out of date compared to the latest upstream version.
|
||||
On Ubuntu 13.04 and newer if you experience an issue of system sensor monitoring not working, other multi-process tasks, or related issues reported as PHP PCNTL missing, the pcntl functions need to be removed from the *disable_functions* line within the */etc/php5/cli/php.ini* file. This may also affect other Linux distribution support too if the vendor disables access to the PCNTL functions.
|
||||
|
||||
### Fedora / Red Hat Installation
|
||||
The Phoronix Test Suite can be installed on Fedora, Red Hat Enterprise Linux, and CentOS systems using the generic installation method. Alternatively, a *phoronix-test-suite* package is available in recent versions of the Fedora repository and in the EPEL (Extra Packages for Enterprise Linux) repository for Red Hat Enterprise Linux. At this time, however, the Fedora-supplied package is vastly out of date.
|
||||
The Phoronix Test Suite can be installed on Fedora, Red Hat Enterprise Linux, and CentOS systems using the generic installation method. Alternatively, a *phoronix-test-suite* package is available in recent versions of the Fedora repository and in the EPEL (Extra Packages for Enterprise Linux) repository for Red Hat Enterprise Linux. However, at times this package may be out-of-date compared to upstream stable.
|
||||
|
||||
### Gentoo Installation
|
||||
Gentoo ebuild's for the Phoronix Test Suite have been created by users and can be currently found in the [Gentoo BugZilla](http://bugs.gentoo.org/show_bug.cgi?id=216656) .
|
||||
@@ -424,8 +430,8 @@ The Phoronix Test Suite core (pts-core) is supported on Solaris and OpenSolaris
|
||||
The Phoronix Test Suite also supports *BSD operating systems. However, like the Solaris support, not all test profiles are compatible with BSD operating systems, but pts-core has been tested against FreeBSD 7.x/8.x/9.x, NetBSD, PC-BSD 7/8/9, DragonFlyBSD 3.0/3.2/3.4/3.6/4.2, and OpenBSD 4.4/4.6. The Phoronix Test Suite will also work with Debian GNU/kFreeBSD.
|
||||
For DragonFlyBSD, it's a matter of just using *pkg_radd* with php5, php5-json, php5-dom, and php5-zip or *pkgsrc* . With DragonFlyBSD using dports, the command is *pkg install php5 php5-dom php5-zip php5-json php5-simplexml* . Under FreeBSD/PC-BSD, PHP can be obtained from the *php5* and *php5-extensions* Ports collection.
|
||||
|
||||
### Mac OS X Installation
|
||||
The Phoronix Test Suite is fully supported on Apple's Mac OS X operating system as of Mac OS X 10.5 with improved support under Mac OS X 10.6. PHP ships with Mac OS X by default so it's simply a matter of downloading the Phoronix Test Suite package, extracting it, and running the executable. For tests that rely upon a compiler, Apple's XCode with GCC and LLVM can be utilized.
|
||||
### MacOS Installation
|
||||
The Phoronix Test Suite is fully supported on Apple's macOS operating system. PHP ships with macOS by default so it's simply a matter of downloading the Phoronix Test Suite package, extracting it, and running the executable. For tests that rely upon a compiler, Apple's XCode with GCC and LLVM can be utilized.
|
||||
|
||||
### Windows Installation
|
||||
The Phoronix Test Suite support on Microsoft Windows is in development and will function just fine, but is not yet feature complete compared to the other operating systems support. Only a small subset of test profiles, mostly related to graphics, are supported. In terms of the version support, right now the Phoronix Test Suite is developed and tested solely against Microsoft Windows 7 x64 and Microsoft Windows 8 x64.
|
||||
@@ -443,7 +449,7 @@ Below are a list of the operating systems that currently have external dependenc
|
||||
---
|
||||
|
||||
|
||||
Alpine LinuxAmazonAngstromArch LinuxCentOSClearOSClearOS Core ServerDebianDragonFlyBSDFedoraFluxbuntuGNU KFreeBSDGentooGoobuntuHPJoli CloudLinaroLinux Embedded Development EnvironmentLinux MintMEPISMac OS XMacPortsMageiaMandrivaMeeGoMicrosoft WindowsMidnightBSDMoblinMythbuntuNetBSDNexenta CoreOLPCOpenIndianaOpenMandrivaOpenSolarisOpenSuSEOptwareOracle ServerPCLinuxOSPTS Desktop LivePTS Linux LivePalmPardus LinuxRed Hat EnterpriseRed Hat Enterprise ServerSUSESUSE LinuxScientificScientificSLSolusSolus LinuxTermuxUbuntuVoid LinuxZenwalkgNewSensemacOS Brew
|
||||
Alpine LinuxAmazonAngstromArch LinuxCentOSClearOSClearOS Core ServerDebianDragonFlyBSDFedoraFluxbuntuGNU KFreeBSDGentooGoobuntuHPJoli CloudLinaroLinux Embedded Development EnvironmentLinux MintMEPISMac OS XMacPortsMageiaMandrivaMeeGoMicrosoft WindowsMidnightBSDMoblinMythbuntuNetBSDNexenta CoreOLPCOpenIndianaOpenMandrivaOpenMandrivaLinuxOpenSolarisOpenSuSEOptwareOracle ServerPCLinuxOSPTS Desktop LivePTS Linux LivePalmPardus LinuxRed Hat EnterpriseRed Hat Enterprise ServerSUSESUSE LinuxScientificScientificSLSolusSolus LinuxTermuxUbuntuVoid LinuxZenwalkgNewSensemacOS Brew
|
||||
# Configuration
|
||||
|
||||
## User Files & Folders
|
||||
@@ -621,14 +627,14 @@ This is a collection of test profiles found within the specified OpenBenchmarkin
|
||||
This is a collection of test profiles found within the specified OpenBenchmarking.org repository where the test profile is specified via an internal tag as testing smp.
|
||||
#### Cuda Tests pts/cuda
|
||||
This is a collection of test profiles found within the specified OpenBenchmarking.org repository where the test profile is specified via an internal tag as testing cuda.
|
||||
#### Openmp Tests pts/openmp
|
||||
This is a collection of test profiles found within the specified OpenBenchmarking.org repository where the test profile is specified via an internal tag as testing openmp.
|
||||
#### Python Tests pts/python
|
||||
This is a collection of test profiles found within the specified OpenBenchmarking.org repository where the test profile is specified via an internal tag as testing python.
|
||||
#### Go Tests pts/go
|
||||
This is a collection of test profiles found within the specified OpenBenchmarking.org repository where the test profile is specified via an internal tag as testing go.
|
||||
#### Mpi Tests pts/mpi
|
||||
This is a collection of test profiles found within the specified OpenBenchmarking.org repository where the test profile is specified via an internal tag as testing mpi.
|
||||
#### Openmp Tests pts/openmp
|
||||
This is a collection of test profiles found within the specified OpenBenchmarking.org repository where the test profile is specified via an internal tag as testing openmp.
|
||||
#### Vdpau Tests pts/vdpau
|
||||
This is a collection of test profiles found within the specified OpenBenchmarking.org repository where the test profile is specified via an internal tag as testing vdpau.
|
||||
#### Video Tests pts/video
|
||||
@@ -683,6 +689,62 @@ This is a collection of test profiles found within the specified OpenBenchmarkin
|
||||
This is a collection of test profiles found within the specified OpenBenchmarking.org repository where the test profile is specified via an internal tag as testing opencl.
|
||||
#### Cuda Tests system/cuda
|
||||
This is a collection of test profiles found within the specified OpenBenchmarking.org repository where the test profile is specified via an internal tag as testing cuda.
|
||||
#### All PTS Tests pts/all
|
||||
This is a collection of all test profiles found within the specified OpenBenchmarking.org repository.
|
||||
#### Installed Tests pts/installed
|
||||
This is a collection of test profiles found within the specified OpenBenchmarking.org repository that are already installed on the system under test.
|
||||
#### Linux Operating System Tests pts/linux
|
||||
This is a collection of test profiles found within the specified OpenBenchmarking.org repository where the test profile is specified as being compatible with the Linux Operating System.
|
||||
#### Solaris Operating System Tests pts/solaris
|
||||
This is a collection of test profiles found within the specified OpenBenchmarking.org repository where the test profile is specified as being compatible with the Solaris Operating System.
|
||||
#### BSD Operating System Tests pts/bsd
|
||||
This is a collection of test profiles found within the specified OpenBenchmarking.org repository where the test profile is specified as being compatible with the BSD Operating System.
|
||||
#### MacOSX Operating System Tests pts/macosx
|
||||
This is a collection of test profiles found within the specified OpenBenchmarking.org repository where the test profile is specified as being compatible with the MacOSX Operating System.
|
||||
#### Windows Operating System Tests pts/windows
|
||||
This is a collection of test profiles found within the specified OpenBenchmarking.org repository where the test profile is specified as being compatible with the Windows Operating System.
|
||||
#### Hurd Operating System Tests pts/hurd
|
||||
This is a collection of test profiles found within the specified OpenBenchmarking.org repository where the test profile is specified as being compatible with the Hurd Operating System.
|
||||
#### System Subsystem Tests pts/system
|
||||
This is a collection of test profiles found within the specified OpenBenchmarking.org repository where the test profile is specified as being a test of the System sub-system.
|
||||
#### Processor Subsystem Tests pts/processor
|
||||
This is a collection of test profiles found within the specified OpenBenchmarking.org repository where the test profile is specified as being a test of the Processor sub-system.
|
||||
#### Graphics Subsystem Tests pts/graphics
|
||||
This is a collection of test profiles found within the specified OpenBenchmarking.org repository where the test profile is specified as being a test of the Graphics sub-system.
|
||||
#### Other Subsystem Tests pts/other
|
||||
This is a collection of test profiles found within the specified OpenBenchmarking.org repository where the test profile is specified as being a test of the Other sub-system.
|
||||
#### Utility Tests pts/utility
|
||||
This is a collection of test profiles found within the specified OpenBenchmarking.org repository where the test profile is specified as being a Utility software test.
|
||||
#### Simulator Tests pts/simulator
|
||||
This is a collection of test profiles found within the specified OpenBenchmarking.org repository where the test profile is specified as being a Simulator software test.
|
||||
#### Scientific Tests pts/scientific
|
||||
This is a collection of test profiles found within the specified OpenBenchmarking.org repository where the test profile is specified as being a Scientific software test.
|
||||
#### Benchmark Tests pts/benchmark
|
||||
This is a collection of test profiles found within the specified OpenBenchmarking.org repository where the test profile is specified as being a Benchmark software test.
|
||||
#### Application Tests pts/application
|
||||
This is a collection of test profiles found within the specified OpenBenchmarking.org repository where the test profile is specified as being a Application software test.
|
||||
#### Game Tests pts/game
|
||||
This is a collection of test profiles found within the specified OpenBenchmarking.org repository where the test profile is specified as being a Game software test.
|
||||
#### Smp Tests pts/smp
|
||||
This is a collection of test profiles found within the specified OpenBenchmarking.org repository where the test profile is specified via an internal tag as testing smp.
|
||||
#### Cuda Tests pts/cuda
|
||||
This is a collection of test profiles found within the specified OpenBenchmarking.org repository where the test profile is specified via an internal tag as testing cuda.
|
||||
#### Openmp Tests pts/openmp
|
||||
This is a collection of test profiles found within the specified OpenBenchmarking.org repository where the test profile is specified via an internal tag as testing openmp.
|
||||
#### Python Tests pts/python
|
||||
This is a collection of test profiles found within the specified OpenBenchmarking.org repository where the test profile is specified via an internal tag as testing python.
|
||||
#### Go Tests pts/go
|
||||
This is a collection of test profiles found within the specified OpenBenchmarking.org repository where the test profile is specified via an internal tag as testing go.
|
||||
#### Mpi Tests pts/mpi
|
||||
This is a collection of test profiles found within the specified OpenBenchmarking.org repository where the test profile is specified via an internal tag as testing mpi.
|
||||
#### Vdpau Tests pts/vdpau
|
||||
This is a collection of test profiles found within the specified OpenBenchmarking.org repository where the test profile is specified via an internal tag as testing vdpau.
|
||||
#### Video Tests pts/video
|
||||
This is a collection of test profiles found within the specified OpenBenchmarking.org repository where the test profile is specified via an internal tag as testing video.
|
||||
#### Responsiveness Tests pts/responsiveness
|
||||
This is a collection of test profiles found within the specified OpenBenchmarking.org repository where the test profile is specified via an internal tag as testing responsiveness.
|
||||
#### Openmpi Tests pts/openmpi
|
||||
This is a collection of test profiles found within the specified OpenBenchmarking.org repository where the test profile is specified via an internal tag as testing openmpi.
|
||||
|
||||
# Component Testing
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
</head>
|
||||
<body>
|
||||
<h1>Overview</h1>
|
||||
<p>The Phoronix Test Suite is the most comprehensive testing and benchmarking platform available for Linux, Solaris, Mac OS X, and BSD operating systems. The Phoronix Test Suite allows for carrying out tests in a fully automated manner from test installation to execution and reporting. All tests are meant to be easily reproducible, easy-to-use, and support fully automated execution. The Phoronix Test Suite is open-source under the GNU GPLv3 license and is developed by Phoronix Media in cooperation with partners. Version 1.0 of the Phoronix Test Suite was publicly released in 2008.</p>
|
||||
<p>The Phoronix Test Suite is the most comprehensive testing and benchmarking platform available for Linux, Solaris, macOS, Windows, and BSD operating systems. The Phoronix Test Suite allows for carrying out tests in a fully automated manner from test installation to execution and reporting. All tests are meant to be easily reproducible, easy-to-use, and support fully automated execution. The Phoronix Test Suite is open-source under the GNU GPLv3 license and is developed by Phoronix Media in cooperation with partners. Version 1.0 of the Phoronix Test Suite was publicly released in 2008.</p>
|
||||
<p>The Phoronix Test Suite client itself is a test framework for providing seamless execution of test profiles and test suites. There are more than 200 tests available by default, which are transparently available via <a href="http://openbenchmarking.org/">OpenBenchmarking.org</a> integration. Of these default test profiles there is a range of sub-systems that can be tested and a range of hardware from mobile devices to desktops and worksrtations/servers. New tests can be easily introduced via the Phoronix Test Suite's extensible test architecture, with test profiles consisting of XML files and shell scripts. Test profiles can produce a quantitative result or other qualitative/abstract results like image quality comparisons and pass/fail. Using Phoronix Test Suite modules, other data can also be automatically collected at run-time such as the system power consumption, disk usage, and other software/hardware sensors. Test suites contain references to test profiles to execute as part of a set or can also reference other test suites. Test suites are defined via an XML schema.</p>
|
||||
<p>Running the Phoronix Test Suite for the first time can be as simple as issuing a command such as <em>phoronix-test-suite benchmark c-ray</em>, which would proceed to install a simple CPU test, execute the test, and report the results. Along with the results, the system's hardware/software information is collected in a detailed manner, relevant system logs, and other important system attributes such as compiler flags and system state. Users can optionally upload their results to OpenBenchmarking.org for sharing results with others, comparing results against other systems, and to carry out further analysis.</p>
|
||||
<h1>OpenBenchmarking.org</h1>
|
||||
|
||||
@@ -84,6 +84,9 @@
|
||||
<h3>default-run<em> [Test | Suite | OpenBenchmarking ID | Test Result] ...</em>
|
||||
</h3>
|
||||
<p>This option will run the selected test(s). The name of the test or suite must be supplied or the OpenBenchmarking.org ID or saved local file name. Multiple arguments can be supplied to run additional tests at the same time and save the results in a suite-like fashion. Unlike the normal run option, the default-run will not prompt the user to select from the available test options but will instead use the default options as automatically set by pts-core or the test profile. Use batch-run to automatically test all of the available options.</p>
|
||||
<h3>dry-run<em> [Test | Suite | OpenBenchmarking ID | Test Result] ...</em>
|
||||
</h3>
|
||||
<p>This option and its arguments pre-set the Phoronix Test Suite batch run mode with enforcing of defaults to not save any results and other behavior intended for a dry/test run. This option is primarily intended for testing/evaluation purposes.</p>
|
||||
<h3>internal-run<em> [Test | Suite | OpenBenchmarking ID | Test Result] ...</em>
|
||||
</h3>
|
||||
<p>This option and its arguments pre-set the Phoronix Test Suite batch run mode with sane values for carrying out benchmarks in a semi-automated manner and without uploading any of the result data to the public OpenBenchmarking.org.</p>
|
||||
@@ -112,6 +115,9 @@
|
||||
<h3>openbenchmarking-uploads<em> </em>
|
||||
</h3>
|
||||
<p>This option will list any recent test result uploads from the system's IP address to OpenBenchmarking.org.</p>
|
||||
<h3>recently-added-tests<em> </em>
|
||||
</h3>
|
||||
<p>This option will list the most recently added (newest) test profiles.</p>
|
||||
<h3>upload-result<em> [Test Result]</em>
|
||||
</h3>
|
||||
<p>This option is used for uploading a test result to OpenBenchmarking.org.</p>
|
||||
@@ -214,6 +220,9 @@
|
||||
<h3>auto-sort-result-file<em> [Test Result]</em>
|
||||
</h3>
|
||||
<p>This option is used if you wish to automatically attempt to sort the results by their result identifier string.</p>
|
||||
<h3>compare-results-to-baseline<em> [Test Result] [Test Result]</em>
|
||||
</h3>
|
||||
<p>This option will allows you to specify a result as a baseline (first parameter) and a second result file (second parameter) that will offer some analysis for showing how the second result compares to the first in matching tests.</p>
|
||||
<h3>edit-result-file<em> [Test Result]</em>
|
||||
</h3>
|
||||
<p>This option is used if you wish to edit the title and description of an existing result file.</p>
|
||||
@@ -241,6 +250,9 @@
|
||||
<h3>reorder-result-file<em> [Test Result]</em>
|
||||
</h3>
|
||||
<p>This option is used if you wish to manually change the order in which test results are shown in the Phoronix Test Suite Results Viewer and the contained graphs. The user must specify a saved results file and then they will be prompted to select the results identifiers one at a time in the order they would like them to be displayed from left to right.</p>
|
||||
<h3>result-file-stats<em> [Test Result]</em>
|
||||
</h3>
|
||||
<p>This option is used if you wish to analyze a result file by seeing various statistics on the result data for result files containing at least two sets of data.</p>
|
||||
<h3>result-file-to-csv<em> [Test Result]</em>
|
||||
</h3>
|
||||
<p>This option will read a saved test results file and output the system hardware and software information along with the results to a CSV output. The CSV (Comma Separated Values) output can then be loaded into a spreadsheet for easy viewing.</p>
|
||||
@@ -256,7 +268,7 @@
|
||||
<h3>show-result<em> [Test Result]</em>
|
||||
</h3>
|
||||
<p>Open up the test results in the Phoronix Test Suite Result Viewer or on OpenBenchmarking.org.</p>
|
||||
<h3>winners-and-losers<em> [Test Result]</em>
|
||||
<h3>wins-and-losses<em> [Test Result]</em>
|
||||
</h3>
|
||||
<p>This option is used if you wish to analyze a result file to see which runs produced the most wins/losses of those result identifiers in the saved file.</p>
|
||||
<h1>Other</h1>
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -4,7 +4,7 @@
|
||||
</head>
|
||||
<body>
|
||||
<h1>Setup Overview</h1>
|
||||
<p>The Phoronix Test Suite supports Linux, Apple Mac OS X, Microsoft Windows, Solaris, Hurd, BSD, and other operating system environments. The only Linux distribution-specific code deals with the external dependencies support feature that are set by individual test profiles. If you are not running one of the supported Linux distributions, Solaris, BSD, or Mac OS X, you may need to install a package manually (as instructed by the Phoronix Test Suite) in order for a test to run. An example of an external dependency would be GCC and the OpenGL Utility Toolkit being needed for test profiles that build an OpenGL benchmark from source-code.</p>
|
||||
<p>The Phoronix Test Suite supports Linux, Apple macOS, Microsoft Windows, Solaris, Hurd, BSD, and other operating system environments. The only Linux distribution-specific code deals with the external dependencies support feature that are set by individual test profiles. If you are not running one of the supported Linux distributions, Solaris, BSD, or macOS, you may need to install a package manually (as instructed by the Phoronix Test Suite) in order for a test to run. An example of an external dependency would be GCC and the OpenGL Utility Toolkit being needed for test profiles that build an OpenGL benchmark from source-code.</p>
|
||||
<p>Among the distributions where the Phoronix Test Suite has been officially tested include Ubuntu, Fedora, Mandriva / Mageia, Gentoo, PCLinuxOS, Arch Linux, Pardus, OpenSuSE, Optware, webOS, Zenwalk, CentOS, Red Hat Enterprise Linux, Oracle Linux, Scientific Linux, Debian, Mint, MEPIS, Alpine Linux, Void Linux, Intel Clear Linux, and Amazon Linux EC2.</p>
|
||||
<p>Among the tested BSD distributions are FreeBSD, PC-BSD, NetBSD, OpenBSD, Debian GNU/kFreeBSD, and DragonflyBSD. Tested Solaris distributions include OpenSolaris, Solaris Express 11, Oracle Solaris 11, OpenIndiana, Illumos, and Nexenta.</p>
|
||||
<h1>Dependencies</h1>
|
||||
@@ -37,10 +37,8 @@
|
||||
<p>Running <em>install-sh</em> from the root directory of the Phoronix Test Suite will install the software for system-wide access. By default the <em>phoronix-test-suite</em> executable is in <em>/usr/bin/</em>, the Phoronix Test Suite files in <em>/usr/share/phoronix-test-suite/</em>, and the documentation in /<em>usr/share/doc/phoronix-test-suite/</em>. Root access is required. The default installation prefix is /usr/ but can be adjusted as the first argument (example: <em>install-sh /home/user/</em> to install the Phoronix Test Suite in your home directory).</p>
|
||||
<h2>Debian/Ubuntu Installation</h2>
|
||||
<p>Debian/Ubuntu users are able to follow the Generic Installation instructions or can obtain a Debian Package from the Phoronix Test Suite web-site. The package contains the <em>phoronix-test-suite</em> executable in <em>/usr/bin/</em>, the Phoronix Test Suite files in <em>/usr/share/phoronix-test-suite/</em>, and the documentation in <em>/usr/share/doc/phoronix-test-suite/</em>.</p>
|
||||
<p>A phoronix-test-suite package can also be found in the official Ubuntu universe repository beginning with the Ubuntu 9.04 (Jaunty) release, but it may be out of date compared to the latest upstream version.</p>
|
||||
<p>On Ubuntu 13.04 and newer if you experience an issue of system sensor monitoring not working, other multi-process tasks, or related issues reported as PHP PCNTL missing, the pcntl functions need to be removed from the <em>disable_functions</em> line within the <em>/etc/php5/cli/php.ini</em> file. This may also affect other Linux distribution support too if the vendor disables access to the PCNTL functions.</p>
|
||||
<h2>Fedora / Red Hat Installation</h2>
|
||||
<p>The Phoronix Test Suite can be installed on Fedora, Red Hat Enterprise Linux, and CentOS systems using the generic installation method. Alternatively, a <em>phoronix-test-suite</em> package is available in recent versions of the Fedora repository and in the EPEL (Extra Packages for Enterprise Linux) repository for Red Hat Enterprise Linux. At this time, however, the Fedora-supplied package is vastly out of date.</p>
|
||||
<p>The Phoronix Test Suite can be installed on Fedora, Red Hat Enterprise Linux, and CentOS systems using the generic installation method. Alternatively, a <em>phoronix-test-suite</em> package is available in recent versions of the Fedora repository and in the EPEL (Extra Packages for Enterprise Linux) repository for Red Hat Enterprise Linux. However, at times this package may be out-of-date compared to upstream stable.</p>
|
||||
<h2>Gentoo Installation</h2>
|
||||
<p>Gentoo ebuild's for the Phoronix Test Suite have been created by users and can be currently found in the <a href="http://bugs.gentoo.org/show_bug.cgi?id=216656">Gentoo BugZilla</a>.</p>
|
||||
<h2>Mandriva Installation</h2>
|
||||
@@ -50,8 +48,8 @@
|
||||
<h2>BSD Installation</h2>
|
||||
<p>The Phoronix Test Suite also supports *BSD operating systems. However, like the Solaris support, not all test profiles are compatible with BSD operating systems, but pts-core has been tested against FreeBSD 7.x/8.x/9.x, NetBSD, PC-BSD 7/8/9, DragonFlyBSD 3.0/3.2/3.4/3.6/4.2, and OpenBSD 4.4/4.6. The Phoronix Test Suite will also work with Debian GNU/kFreeBSD.</p>
|
||||
<p>For DragonFlyBSD, it's a matter of just using <em>pkg_radd</em> with php5, php5-json, php5-dom, and php5-zip or <em>pkgsrc</em>. With DragonFlyBSD using dports, the command is <em>pkg install php5 php5-dom php5-zip php5-json php5-simplexml</em>. Under FreeBSD/PC-BSD, PHP can be obtained from the <em>php5</em> and <em>php5-extensions</em> Ports collection.</p>
|
||||
<h2>Mac OS X Installation</h2>
|
||||
<p>The Phoronix Test Suite is fully supported on Apple's Mac OS X operating system as of Mac OS X 10.5 with improved support under Mac OS X 10.6. PHP ships with Mac OS X by default so it's simply a matter of downloading the Phoronix Test Suite package, extracting it, and running the executable. For tests that rely upon a compiler, Apple's XCode with GCC and LLVM can be utilized.</p>
|
||||
<h2>MacOS Installation</h2>
|
||||
<p>The Phoronix Test Suite is fully supported on Apple's macOS operating system. PHP ships with macOS by default so it's simply a matter of downloading the Phoronix Test Suite package, extracting it, and running the executable. For tests that rely upon a compiler, Apple's XCode with GCC and LLVM can be utilized.</p>
|
||||
<h2>Windows Installation</h2>
|
||||
<p>The Phoronix Test Suite support on Microsoft Windows is in development and will function just fine, but is not yet feature complete compared to the other operating systems support. Only a small subset of test profiles, mostly related to graphics, are supported. In terms of the version support, right now the Phoronix Test Suite is developed and tested solely against Microsoft Windows 7 x64 and Microsoft Windows 8 x64.</p>
|
||||
<p>At this time the Phoronix Test Suite client is dependent upon the <em>php.exe</em> executable being installed to <em>C:\Program Files (x86)\PHP\ </em> or one of its subdirectories (see PHP installation notes above). Once this requirement is met, simply download the Phoronix Test Suite package, extract it to a directory of your choice, and run <em>phoronix-test-suite.bat</em></p>
|
||||
|
||||
@@ -1 +1,10 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>External Dependencies</title></head><body><p>The Phoronix Test Suite has a feature known as "External Dependencies" where the Phoronix Test Suite can attempt to automatically install some of the test-specific dependencies on supported distributions. If running on a distribution where there is currently no External Dependencies profile, the needed package name(s) are listed for manual installation.</p><p>Below are a list of the operating systems that currently have external dependencies support within the Phoronix Test Suite for the automatic installation of needed test files.<hr><ul></ul><li>Alpine Linux</li><li>Amazon</li><li>Angstrom</li><li>Arch Linux</li><li>CentOS</li><li>ClearOS</li><li>ClearOS Core Server</li><li>Debian</li><li>DragonFlyBSD</li><li>Fedora</li><li>Fluxbuntu</li><li>GNU KFreeBSD</li><li>Gentoo</li><li>Goobuntu</li><li>HP</li><li>Joli Cloud</li><li>Linaro</li><li>Linux Embedded Development Environment</li><li>Linux Mint</li><li>MEPIS</li><li>Mac OS X</li><li>MacPorts</li><li>Mageia</li><li>Mandriva</li><li>MeeGo</li><li>Microsoft Windows</li><li>MidnightBSD</li><li>Moblin</li><li>Mythbuntu</li><li>NetBSD</li><li>Nexenta Core</li><li>OLPC</li><li>OpenIndiana</li><li>OpenMandriva</li><li>OpenSolaris</li><li>OpenSuSE</li><li>Optware</li><li>Oracle Server</li><li>PCLinuxOS</li><li>PTS Desktop Live</li><li>PTS Linux Live</li><li>Palm</li><li>Pardus Linux</li><li>Red Hat Enterprise</li><li>Red Hat Enterprise Server</li><li>SUSE</li><li>SUSE Linux</li><li>Scientific</li><li>ScientificSL</li><li>Solus</li><li>Solus Linux</li><li>Termux</li><li>Ubuntu</li><li>Void Linux</li><li>Zenwalk</li><li>gNewSense</li><li>macOS Brew</li></p></body></html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>External Dependencies</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>The Phoronix Test Suite has a feature known as "External Dependencies" where the Phoronix Test Suite can attempt to automatically install some of the test-specific dependencies on supported distributions. If running on a distribution where there is currently no External Dependencies profile, the needed package name(s) are listed for manual installation.</p>
|
||||
<p>Below are a list of the operating systems that currently have external dependencies support within the Phoronix Test Suite for the automatic installation of needed test files.<hr><ul></ul><li>Alpine Linux</li><li>Amazon</li><li>Angstrom</li><li>Arch Linux</li><li>CentOS</li><li>ClearOS</li><li>ClearOS Core Server</li><li>Debian</li><li>DragonFlyBSD</li><li>Fedora</li><li>Fluxbuntu</li><li>GNU KFreeBSD</li><li>Gentoo</li><li>Goobuntu</li><li>HP</li><li>Joli Cloud</li><li>Linaro</li><li>Linux Embedded Development Environment</li><li>Linux Mint</li><li>MEPIS</li><li>Mac OS X</li><li>MacPorts</li><li>Mageia</li><li>Mandriva</li><li>MeeGo</li><li>Microsoft Windows</li><li>MidnightBSD</li><li>Moblin</li><li>Mythbuntu</li><li>NetBSD</li><li>Nexenta Core</li><li>OLPC</li><li>OpenIndiana</li><li>OpenMandriva</li><li>OpenMandrivaLinux</li><li>OpenSolaris</li><li>OpenSuSE</li><li>Optware</li><li>Oracle Server</li><li>PCLinuxOS</li><li>PTS Desktop Live</li><li>PTS Linux Live</li><li>Palm</li><li>Pardus Linux</li><li>Red Hat Enterprise</li><li>Red Hat Enterprise Server</li><li>SUSE</li><li>SUSE Linux</li><li>Scientific</li><li>ScientificSL</li><li>Solus</li><li>Solus Linux</li><li>Termux</li><li>Ubuntu</li><li>Void Linux</li><li>Zenwalk</li><li>gNewSense</li><li>macOS Brew</li></p>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -10,7 +10,7 @@ Full details on the Phoronix Test Suite setup and usage is available from the in
|
||||
|
||||
## Installation & Setup
|
||||
|
||||
The Phoronix Test Suite is supported on Linux, *BSD, Solaris, Mac OS X, and Windows systems. However, the most full-featured and well supported operating system for conducting the tests is Linux with some non-basic functionality not being available under all platforms. The Phoronix Test Suite software/framework is compatible with all major CPU architectures (e.g. i686, x86_64, ARM, PowerPC), but not all of the test profiles/suites are compatible with all architectures.
|
||||
The Phoronix Test Suite is supported on Linux, *BSD, Solaris, macOS, and Windows systems. However, the most full-featured and well supported operating system for conducting the tests is Linux with some non-basic functionality not being available under all platforms. The Phoronix Test Suite software/framework is compatible with all major CPU architectures (e.g. i686, x86_64, ARM, PowerPC), but not all of the test profiles/suites are compatible with all architectures.
|
||||
|
||||
The Phoronix Test Suite can be installed for system-wide usage or run locally without installation from the extracted tar.gz/zip package. The only hard dependency on the Phoronix Test Suite is having command-line support for PHP (PHP 5.3+) installed. A complete PHP stack (e.g. with web server) is **not** needed, but merely the PHP command-line support, which is widely available from operating system package managers under the name `php`, `php5-cli`, or `php5`.
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
# Phoronix Test Suite
|
||||
# URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
# Copyright (C) 2008 - 2018, Phoronix Media
|
||||
# Copyright (C) 2008 - 2019, Phoronix Media
|
||||
#
|
||||
# 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
|
||||
|
||||
@@ -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 - 2019, Phoronix Media
|
||||
# Copyright (C) 2008 - 2019, Michael Larabel
|
||||
# phoronix-test-suite: The Phoronix Test Suite is an extensible open-source testing / benchmarking platform
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
@@ -21,6 +21,12 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
if which sed >/dev/null 2>&1 ;
|
||||
then
|
||||
# Remove the current dir from PATH if present, as it causes infinitely resursive shell scripts.
|
||||
PATH="`echo $PATH | sed -e s/:[\.]:/:/g -e s/:[\.]// -e s/[\.]://`"
|
||||
fi
|
||||
|
||||
# Full path to root directory of the actual Phoronix Test Suite code
|
||||
# export PTS_DIR=$(readlink -f `dirname $0`)
|
||||
export PTS_DIR=`pwd`
|
||||
@@ -113,9 +119,9 @@ if [ "X$PHP_BIN" = "X" ]
|
||||
then
|
||||
cat <<'EOT'
|
||||
|
||||
PHP 5.3 or newer or PHP 7 must be installed for the Phoronix Test Suite
|
||||
The PHP command-line package is commonly called php-cli, php5-cli, or php.
|
||||
For more information visit: http://www.phoronix-test-suite.com/
|
||||
PHP must be installed for the Phoronix Test Suite
|
||||
The PHP command-line package is commonly called php-cli, php7-cli, or php.
|
||||
For more information visit: https://www.phoronix-test-suite.com/
|
||||
|
||||
EOT
|
||||
|
||||
@@ -123,7 +129,7 @@ if [ -x /usr/bin/zypper ]
|
||||
then
|
||||
# SUSE / OpenSUSE
|
||||
echo "The command to likely run for your operating system is: "
|
||||
echo "# zypper install php7 php7-zip"
|
||||
echo "# zypper install php7 php7-zip php7-openssl"
|
||||
echo " "
|
||||
elif [ -x /usr/bin/apt-get ]
|
||||
then
|
||||
@@ -135,7 +141,7 @@ elif [ -x /usr/bin/dnf ]
|
||||
then
|
||||
# Modern Fedora
|
||||
echo "The command to likely run for your operating system is: "
|
||||
echo "# dnf install php-cli php-xml"
|
||||
echo "# dnf install php-cli php-xml php-json"
|
||||
echo " "
|
||||
elif [ -x /usr/bin/yum ]
|
||||
then
|
||||
@@ -161,7 +167,7 @@ then
|
||||
echo "The command to likely run for your operating system is: "
|
||||
echo "# pkg install php72 php72-dom php72-zip php72-json php72-simplexml php72-openssl"
|
||||
echo " "
|
||||
elif [ -x /usr/local/swupd ]
|
||||
elif [ -x /usr/bin/swupd ]
|
||||
then
|
||||
# Clear Linux
|
||||
echo "The command to likely run for your operating system is: "
|
||||
@@ -213,7 +219,7 @@ elif [ -x /usr/sbin/mport ]
|
||||
then
|
||||
# MidnightBSD
|
||||
echo "The command to likely run for your operating system is: "
|
||||
echo "# mport install php70 php70-dom php70-zip php70-json php70-simplexml"
|
||||
echo "# mport install php71 php71-dom php71-zip php71-json php71-simplexml"
|
||||
echo " "
|
||||
elif [ -x /bin/opkg ]
|
||||
then
|
||||
@@ -249,7 +255,7 @@ then
|
||||
cat <<'EOT'
|
||||
|
||||
To run the Phoronix Test Suite locally you must first change directories to phoronix-test-suite/
|
||||
or install the program using the install-sh script. For support visit: http://www.phoronix-test-suite.com/
|
||||
or install the program using the install-sh script. For support visit: https://www.phoronix-test-suite.com/
|
||||
|
||||
EOT
|
||||
exit
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
:: 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 - 2019, Phoronix Media
|
||||
:: Copyright (C) 2008 - 2019, Michael Larabel
|
||||
:: phoronix-test-suite: The Phoronix Test Suite is an extensible open-source testing / benchmarking platform
|
||||
::
|
||||
:: This program is free software; you can redistribute it and/or modify
|
||||
|
||||
65
pts-core/commands/compare_results_to_baseline.php
Normal file
65
pts-core/commands/compare_results_to_baseline.php
Normal file
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2008 - 2019, Phoronix Media
|
||||
Copyright (C) 2008 - 2019, 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
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
class compare_results_to_baseline implements pts_option_interface
|
||||
{
|
||||
const doc_section = 'Result Management';
|
||||
const doc_description = 'This option will allows you to specify a result as a baseline (first parameter) and a second result file (second parameter) that will offer some analysis for showing how the second result compares to the first in matching tests.';
|
||||
|
||||
public static function argument_checks()
|
||||
{
|
||||
return array(
|
||||
new pts_argument_check(0, array('pts_types', 'is_result_file'), null),
|
||||
new pts_argument_check(1, array('pts_types', 'is_result_file'), null)
|
||||
);
|
||||
}
|
||||
public static function run($r)
|
||||
{
|
||||
if(count($r) != 2)
|
||||
{
|
||||
echo PHP_EOL . 'Two results must be specified: phoronix-test-suite compare-results-to-baseline <baseline result file> <compare result file>' . PHP_EOL;
|
||||
return false;
|
||||
}
|
||||
$baseline = new pts_result_file($r[0]);
|
||||
echo 'Baseline: ' . $baseline->get_identifier() . PHP_EOL;
|
||||
if(count($baseline->get_system_identifiers()) != 1)
|
||||
{
|
||||
echo PHP_EOL . 'This feature requires only one system/result to be present in the result file.' . PHP_EOL;
|
||||
return false;
|
||||
}
|
||||
$baseline->rename_run(null, 'Baseline');
|
||||
|
||||
$result = new pts_result_file($r[1]);
|
||||
echo 'Result: ' . $result->get_identifier() . PHP_EOL;
|
||||
if(count($result->get_system_identifiers()) != 1)
|
||||
{
|
||||
echo PHP_EOL . 'This feature requires only one system/result to be present in the result file.' . PHP_EOL;
|
||||
return false;
|
||||
}
|
||||
$result->rename_run(null, 'Result');
|
||||
|
||||
$baseline->add_to_result_file($result, true);
|
||||
echo pts_result_file_analyzer::display_results_baseline_two_way_compare($baseline, false, true);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
51
pts-core/commands/dry_run.php
Normal file
51
pts-core/commands/dry_run.php
Normal file
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2013 - 2018, Phoronix Media
|
||||
Copyright (C) 2013 - 2018, 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
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
class dry_run implements pts_option_interface
|
||||
{
|
||||
const doc_section = 'Batch Testing';
|
||||
const doc_description = 'This option and its arguments pre-set the Phoronix Test Suite batch run mode with enforcing of defaults to not save any results and other behavior intended for a dry/test run. This option is primarily intended for testing/evaluation purposes.';
|
||||
|
||||
public static function argument_checks()
|
||||
{
|
||||
return array(
|
||||
new pts_argument_check('VARIABLE_LENGTH', array('pts_types', 'identifier_to_object'), null)
|
||||
);
|
||||
}
|
||||
public static function run($r)
|
||||
{
|
||||
pts_test_installer::standard_install($r);
|
||||
$test_run_manager = new pts_test_run_manager(array(
|
||||
'UploadResults' => false,
|
||||
'SaveResults' => false,
|
||||
'PromptForTestDescription' => false,
|
||||
'RunAllTestCombinations' => false,
|
||||
'PromptSaveName' => false,
|
||||
'PromptForTestIdentifier' => false,
|
||||
'OpenBrowser' => false
|
||||
));
|
||||
|
||||
$test_run_manager->standard_run($r);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -3,8 +3,8 @@
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2010 - 2018, Phoronix Media
|
||||
Copyright (C) 2010 - 2018, Michael Larabel
|
||||
Copyright (C) 2010 - 2019, Phoronix Media
|
||||
Copyright (C) 2010 - 2019, 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
|
||||
@@ -28,9 +28,9 @@ class dump_documentation implements pts_option_interface
|
||||
$html_doc = new pts_html_template(pts_core::program_title(false), 'Test Client Documentation');
|
||||
|
||||
$pdf->AddPage();
|
||||
$pdf->Image(PTS_CORE_STATIC_PATH . 'images/pts-308x160.png', 69, 85, 73, 38, 'PNG', 'http://www.phoronix-test-suite.com/');
|
||||
$pdf->Image(PTS_CORE_STATIC_PATH . 'images/pts-308x160.png', 69, 85, 73, 38, 'PNG', 'https://www.phoronix-test-suite.com/');
|
||||
$pdf->Ln(120);
|
||||
$pdf->WriteStatement('www.phoronix-test-suite.com', 'C', 'http://www.phoronix-test-suite.com/');
|
||||
$pdf->WriteStatement('www.phoronix-test-suite.com', 'C', 'https://www.phoronix-test-suite.com/');
|
||||
$pdf->Ln(15);
|
||||
$pdf->WriteBigHeaderCenter(pts_core::program_title(true));
|
||||
$pdf->WriteHeaderCenter('User Manual');
|
||||
@@ -85,6 +85,7 @@ class dump_documentation implements pts_option_interface
|
||||
|
||||
// Write the module options HTML
|
||||
$dom = new DOMDocument();
|
||||
$dom->formatOutput = true;
|
||||
$html = $dom->createElement('html');
|
||||
$dom->appendChild($html);
|
||||
$head = $dom->createElement('head');
|
||||
@@ -138,6 +139,7 @@ class dump_documentation implements pts_option_interface
|
||||
|
||||
// Write the external dependencies HTML
|
||||
$dom = new DOMDocument();
|
||||
$dom->formatOutput = true;
|
||||
$html = $dom->createElement('html');
|
||||
$dom->appendChild($html);
|
||||
$head = $dom->createElement('head');
|
||||
@@ -173,6 +175,7 @@ class dump_documentation implements pts_option_interface
|
||||
|
||||
// Write the virtual suites HTML
|
||||
$dom = new DOMDocument();
|
||||
$dom->formatOutput = true;
|
||||
$html = $dom->createElement('html');
|
||||
$dom->appendChild($html);
|
||||
$head = $dom->createElement('head');
|
||||
@@ -250,7 +253,7 @@ class dump_documentation implements pts_option_interface
|
||||
$man_page .= '.B ' . trim($option[0] . ' ' . (!empty($option[1]) && is_array($option[1]) ? implode(' ', $option[1]) : null)) . PHP_EOL . $option[2] . PHP_EOL . '.TP' . PHP_EOL;
|
||||
}
|
||||
}
|
||||
$man_page .= '.SH SEE ALSO' . PHP_EOL . '.B Websites:' . PHP_EOL . '.br' . PHP_EOL . 'http://www.phoronix-test-suite.com/' . PHP_EOL . '.br' . PHP_EOL . 'http://commercial.phoronix-test-suite.com/' . PHP_EOL . '.br' . PHP_EOL . 'http://www.openbenchmarking.org/' . PHP_EOL . '.br' . PHP_EOL . 'http://www.phoronix.com/' . PHP_EOL . '.br' . PHP_EOL . 'http://www.phoronix.com/forums/' . PHP_EOL;
|
||||
$man_page .= '.SH SEE ALSO' . PHP_EOL . '.B Websites:' . PHP_EOL . '.br' . PHP_EOL . 'https://www.phoronix-test-suite.com/' . PHP_EOL . '.br' . PHP_EOL . 'https://commercial.phoronix-test-suite.com/' . PHP_EOL . '.br' . PHP_EOL . 'https://www.openbenchmarking.org/' . PHP_EOL . '.br' . PHP_EOL . 'https://www.phoronix.com/' . PHP_EOL . '.br' . PHP_EOL . 'https://www.phoronix.com/forums/' . PHP_EOL;
|
||||
$man_page .= '.SH AUTHORS' . PHP_EOL . 'Copyright 2008 - ' . date('Y') . ' by Phoronix Media, Michael Larabel.' . PHP_EOL . '.TP' . PHP_EOL;
|
||||
|
||||
file_put_contents(PTS_PATH . 'documentation/man-pages/phoronix-test-suite.1', $man_page);
|
||||
@@ -258,7 +261,7 @@ class dump_documentation implements pts_option_interface
|
||||
|
||||
|
||||
// simple README
|
||||
$readme = '# Phoronix Test Suite ' . PTS_VERSION . PHP_EOL . 'http://www.phoronix-test-suite.com/' . PHP_EOL . PHP_EOL;
|
||||
$readme = '# Phoronix Test Suite ' . PTS_VERSION . PHP_EOL . 'https://www.phoronix-test-suite.com/' . PHP_EOL . PHP_EOL;
|
||||
$readme .= pts_documentation::basic_description() . PHP_EOL . PHP_EOL;
|
||||
$readme .= pts_file_io::file_get_contents(PTS_PATH . 'documentation/stubs/readme-basics.txt') . PHP_EOL . PHP_EOL;
|
||||
$readme = wordwrap($readme, 80, PHP_EOL);
|
||||
@@ -269,12 +272,12 @@ class dump_documentation implements pts_option_interface
|
||||
$html_doc = new pts_html_template(pts_core::program_title(false), 'Phoromatic Documentation');
|
||||
|
||||
$pdf->AddPage();
|
||||
$pdf->Image(PTS_CORE_STATIC_PATH . 'images/pts-308x160.png', 69, 85, 73, 38, 'PNG', 'http://www.phoronix-test-suite.com/');
|
||||
$pdf->Image(PTS_CORE_STATIC_PATH . 'images/pts-308x160.png', 69, 85, 73, 38, 'PNG', 'https://www.phoronix-test-suite.com/');
|
||||
$pdf->Ln(120);
|
||||
$pdf->WriteStatement('www.phoronix-test-suite.com', 'C', 'http://www.phoronix-test-suite.com/');
|
||||
$pdf->WriteStatement('www.phoronix-test-suite.com', 'C', 'https://www.phoronix-test-suite.com/');
|
||||
$pdf->Ln(15);
|
||||
$pdf->Image(PTS_CORE_STATIC_PATH . 'images/phoromatic-390x56.png', 55, 250, 0, 0, 'PNG', 'http://www.phoronix-test-suite.com/');
|
||||
//$pdf->Image(PTS_CORE_STATIC_PATH . 'images/phoromatic-390x56.png', 69, 85, 73, 38, 'PNG', 'http://www.phoromatic.com/');
|
||||
$pdf->Image(PTS_CORE_STATIC_PATH . 'images/phoromatic-390x56.png', 55, 250, 0, 0, 'PNG', 'https://www.phoronix-test-suite.com/');
|
||||
//$pdf->Image(PTS_CORE_STATIC_PATH . 'images/phoromatic-390x56.png', 69, 85, 73, 38, 'PNG', 'https://www.phoromatic.com/');
|
||||
$pdf->WriteBigHeaderCenter(pts_core::program_title(true));
|
||||
$pdf->WriteHeaderCenter('Phoromatic User Manual');
|
||||
$pdf->html_to_pdf(PTS_PATH . 'documentation/phoromatic.html');
|
||||
|
||||
139
pts-core/commands/dump_ob_to_ae_db.php
Normal file
139
pts-core/commands/dump_ob_to_ae_db.php
Normal file
@@ -0,0 +1,139 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2019, Phoronix Media
|
||||
Copyright (C) 2019, 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
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
ini_set('memory_limit', '8G');
|
||||
|
||||
class dump_ob_to_ae_db implements pts_option_interface
|
||||
{
|
||||
public static function run($r)
|
||||
{
|
||||
$dir_to_recursively_scan = $r[0];
|
||||
if(!is_dir($dir_to_recursively_scan))
|
||||
{
|
||||
echo $dir_to_recursively_scan . ' is not a dir.';
|
||||
return false;
|
||||
}
|
||||
$storage_dir = $r[1];
|
||||
if(!is_dir($storage_dir))
|
||||
{
|
||||
echo $storage_dir . ' is not a dir.';
|
||||
return false;
|
||||
}
|
||||
|
||||
$ae = new pts_ae_data($storage_dir);
|
||||
$xml_files = array();
|
||||
pts_file_io::recursively_find_files_in_directory($dir_to_recursively_scan, $xml_files, '.xml');
|
||||
|
||||
foreach($xml_files as $file)
|
||||
{
|
||||
$result_reference = null; // TODO fill in OpenBenchmarking.org ID for that
|
||||
$rf = new pts_result_file($file, false, true);
|
||||
$systems = $rf->get_systems();
|
||||
$system_data = array();
|
||||
$timestamps = array();
|
||||
$system_types = array();
|
||||
foreach($systems as $system)
|
||||
{
|
||||
$system_data[$system->get_identifier()] = array_map(array('pts_strings', 'trim_search_query'), array_merge(pts_result_file_analyzer::system_component_string_to_array($system->get_hardware()), pts_result_file_analyzer::system_component_string_to_array($system->get_software())));
|
||||
$timestamps[$system->get_identifier()] = strtotime($system->get_timestamp());
|
||||
$system_types[$system->get_identifier()] = phodevi_base::determine_system_type($system->get_hardware(), $system->get_software());
|
||||
}
|
||||
|
||||
foreach($rf->get_result_objects() as $ro)
|
||||
{
|
||||
if($ro->test_profile->get_identifier() == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
$comparison_hash = $ro->get_comparison_hash(true, false);
|
||||
$inserts = 0;
|
||||
foreach($ro->test_result_buffer as &$buffers)
|
||||
{
|
||||
if(empty($buffers))
|
||||
continue;
|
||||
|
||||
foreach($buffers as &$buffer_item)
|
||||
{
|
||||
$result = $buffer_item->get_result_value();
|
||||
if(stripos($result, ',') !== false || !is_numeric($result))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
$system_identifier = $buffer_item->get_result_identifier();
|
||||
$system_layer = isset($system_data[$system_identifier]['System Layer']) ? $system_data[$system_identifier]['System Layer'] : null;
|
||||
|
||||
switch($ro->test_profile->get_test_hardware_type())
|
||||
{
|
||||
case 'Processor':
|
||||
$component = 'Processor';
|
||||
$related_component = 'OS';
|
||||
break;
|
||||
case 'System':
|
||||
$component = 'Processor';
|
||||
$related_component = 'Motherboard';
|
||||
break;
|
||||
case 'Graphics':
|
||||
$component = 'Graphics';
|
||||
$related_component = 'OpenGL';
|
||||
break;
|
||||
case 'Disk':
|
||||
$component = 'Disk';
|
||||
$related_component = 'File-System';
|
||||
break;
|
||||
case 'Network':
|
||||
$component = 'Network';
|
||||
$related_component = 'OS';
|
||||
break;
|
||||
case 'Memory':
|
||||
$component = 'Memory';
|
||||
$related_component = 'Processor';
|
||||
break;
|
||||
default:
|
||||
$component = 'Processor';
|
||||
$related_component = 'OS';
|
||||
break;
|
||||
}
|
||||
|
||||
if(!isset($system_data[$system_identifier][$component]) || empty($system_data[$system_identifier][$component]))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
$component_value = $system_data[$system_identifier][$component];
|
||||
$related_component_value = isset($system_data[$system_identifier][$related_component]) ? $system_data[$system_identifier][$related_component] : null;
|
||||
$ae->insert_result_into_analytic_results($comparison_hash, $result_reference, $component_value, $component, $related_component_value, $related_component, $result, $timestamps[$system_identifier], $system_types[$system_identifier], $system_layer);
|
||||
$inserts++;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if($inserts > 0)
|
||||
{
|
||||
$ae->insert_composite_hash_entry_by_result_object($comparison_hash, $ro);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$ae->rebuild_composite_listing();
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -3,8 +3,8 @@
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2017, Phoronix Media
|
||||
Copyright (C) 2017, Michael Larabel
|
||||
Copyright (C) 2017 - 2019, Phoronix Media
|
||||
Copyright (C) 2017 - 2019, 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
|
||||
@@ -45,7 +45,7 @@ class estimate_run_time implements pts_option_interface
|
||||
$test_count = 0;
|
||||
foreach($args as $arg)
|
||||
{
|
||||
foreach(pts_types::identifiers_to_test_profile_objects($arg) as $t)
|
||||
foreach(pts_types::identifiers_to_test_profile_objects($arg, false, false) as $t)
|
||||
{
|
||||
$tests[] = array($t->get_identifier(), pts_strings::format_time($t->get_estimated_run_time()));
|
||||
$total_time += $t->get_estimated_run_time();
|
||||
|
||||
@@ -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 - 2019, Phoronix Media
|
||||
Copyright (C) 2008 - 2019, 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
|
||||
@@ -175,7 +175,7 @@ class info implements pts_option_interface
|
||||
|
||||
|
||||
// OpenBenchmarking.org Change-Log
|
||||
if(stripos($o->get_identifier(), 'local/') === false)
|
||||
if(stripos($o->get_identifier(), 'local/') === false && !defined('PHOROMATIC_PROCESS'))
|
||||
{
|
||||
|
||||
$change_log = pts_openbenchmarking_client::fetch_repository_test_profile_changelog($o->get_identifier(false));
|
||||
@@ -193,24 +193,27 @@ class info implements pts_option_interface
|
||||
}
|
||||
|
||||
// Recent Test Results With This Test
|
||||
$o_identifier = $o->get_identifier(false);
|
||||
$table = array();
|
||||
foreach(pts_client::saved_test_results() as $saved_results_identifier)
|
||||
if(!defined('PHOROMATIC_PROCESS'))
|
||||
{
|
||||
$result_file = new pts_result_file($saved_results_identifier);
|
||||
foreach($result_file->get_result_objects() as $result_object)
|
||||
$o_identifier = $o->get_identifier(false);
|
||||
$table = array();
|
||||
foreach(pts_client::saved_test_results() as $saved_results_identifier)
|
||||
{
|
||||
if($result_object->test_profile->get_identifier(false) == $o_identifier)
|
||||
$result_file = new pts_result_file($saved_results_identifier);
|
||||
foreach($result_file->get_result_objects() as $result_object)
|
||||
{
|
||||
$table[] = array(pts_client::cli_just_bold($result_file->get_identifier()), $result_file->get_title());
|
||||
break;
|
||||
if($result_object->test_profile->get_identifier(false) == $o_identifier)
|
||||
{
|
||||
$table[] = array(pts_client::cli_just_bold($result_file->get_identifier()), $result_file->get_title());
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!empty($table))
|
||||
{
|
||||
echo PHP_EOL . pts_client::cli_just_bold('Results Containing This Test') . PHP_EOL;
|
||||
echo pts_user_io::display_text_table($table);
|
||||
if(!empty($table))
|
||||
{
|
||||
echo PHP_EOL . pts_client::cli_just_bold('Results Containing This Test') . PHP_EOL;
|
||||
echo pts_user_io::display_text_table($table);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if($o instanceof pts_result_file)
|
||||
@@ -218,6 +221,11 @@ class info implements pts_option_interface
|
||||
echo pts_client::cli_just_bold('Title: ') . $o->get_title() . PHP_EOL . pts_client::cli_just_bold('Identifier: ') . $o->get_identifier() . PHP_EOL;
|
||||
echo PHP_EOL . pts_client::cli_just_bold('Test Result Identifiers:') . PHP_EOL;
|
||||
echo pts_user_io::display_text_list($o->get_system_identifiers());
|
||||
$system_count = count($o->get_system_identifiers());
|
||||
if($system_count > 8)
|
||||
{
|
||||
echo pts_client::cli_just_italic($system_count . ' Systems') . PHP_EOL;
|
||||
}
|
||||
|
||||
$test_titles = array();
|
||||
foreach($o->get_result_objects() as $result_object)
|
||||
@@ -232,6 +240,7 @@ class info implements pts_option_interface
|
||||
{
|
||||
echo PHP_EOL . pts_client::cli_just_bold('Contained Tests:') . PHP_EOL;
|
||||
echo pts_user_io::display_text_list(array_unique($test_titles));
|
||||
echo pts_client::cli_just_italic(pts_strings::plural_handler($o->get_test_count(), 'Test')) . PHP_EOL;
|
||||
}
|
||||
echo PHP_EOL;
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ class make_openbenchmarking_cache implements pts_option_interface
|
||||
echo $i . '/' . $total_count . ': ' . ($repo_index['tests'][$test]['title'] != null ? $repo_index['tests'][$test]['title'] . ' [' . $repo_index['tests'][$test]['test_type'] . ']' : null) . PHP_EOL;
|
||||
$versions = $repo_index['tests'][$test]['versions'];
|
||||
|
||||
if($r[0] == 'lean')
|
||||
if(isset($r[0]) && $r[0] == 'lean')
|
||||
{
|
||||
$versions = array(array_shift($versions));
|
||||
}
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2011 - 2018, Phoronix Media
|
||||
Copyright (C) 2011 - 2018, Michael Larabel
|
||||
Copyright (C) 2011 - 2019, Phoronix Media
|
||||
Copyright (C) 2011 - 2019, 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
|
||||
@@ -25,6 +25,10 @@ class openbenchmarking_changes implements pts_option_interface
|
||||
const doc_section = 'OpenBenchmarking.org';
|
||||
const doc_description = 'This option will list recent changes to test profiles of enabled OpenBenchmarking.org repositories.';
|
||||
|
||||
public static function command_aliases()
|
||||
{
|
||||
return array('recently_updated_tests');
|
||||
}
|
||||
public static function run($r)
|
||||
{
|
||||
pts_client::$display->generic_heading('Recently Updated OpenBenchmarking.org Tests');
|
||||
|
||||
45
pts-core/commands/recently_added_tests.php
Normal file
45
pts-core/commands/recently_added_tests.php
Normal file
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2011 - 2019, Phoronix Media
|
||||
Copyright (C) 2011 - 2019, 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
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
class recently_added_tests implements pts_option_interface
|
||||
{
|
||||
const doc_section = 'OpenBenchmarking.org';
|
||||
const doc_description = 'This option will list the most recently added (newest) test profiles.';
|
||||
|
||||
public static function command_aliases()
|
||||
{
|
||||
return array('newest_tests');
|
||||
}
|
||||
public static function run($r)
|
||||
{
|
||||
pts_client::$display->generic_heading('Recently Added OpenBenchmarking.org Tests');
|
||||
foreach(pts_openbenchmarking_client::recently_added_tests(20) as $added => $test_identifier)
|
||||
{
|
||||
$test_profile = new pts_test_profile($test_identifier);
|
||||
echo sprintf('%-36ls - %-35ls', pts_client::cli_just_bold($test_profile->get_identifier(false)), $test_profile->get_title()) . PHP_EOL;
|
||||
echo sprintf('%-36ls %-35ls', pts_client::cli_just_italic(date('d F Y', $added)), $test_profile->get_test_hardware_type() . ' Test') . PHP_EOL . PHP_EOL;
|
||||
}
|
||||
echo PHP_EOL;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
54
pts-core/commands/result_file_stats.php
Normal file
54
pts-core/commands/result_file_stats.php
Normal file
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2019, Phoronix Media
|
||||
Copyright (C) 2019, 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
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
class result_file_stats implements pts_option_interface
|
||||
{
|
||||
const doc_section = 'Result Management';
|
||||
const doc_description = 'This option is used if you wish to analyze a result file by seeing various statistics on the result data for result files containing at least two sets of data.';
|
||||
|
||||
public static function command_aliases()
|
||||
{
|
||||
return array('winners_and_losers', 'result_stats');
|
||||
}
|
||||
public static function argument_checks()
|
||||
{
|
||||
return array(
|
||||
new pts_argument_check(0, array('pts_types', 'is_result_file'), null)
|
||||
);
|
||||
}
|
||||
public static function run($args)
|
||||
{
|
||||
$result_file = new pts_result_file($args[0]);
|
||||
echo ' ' . pts_client::cli_colored_text($result_file->get_title(), 'gray', true) . PHP_EOL . PHP_EOL;
|
||||
|
||||
if($result_file->get_system_count() < 2)
|
||||
{
|
||||
echo PHP_EOL . 'There are not multiple test runs in this result file.' . PHP_EOL;
|
||||
return false;
|
||||
}
|
||||
|
||||
echo pts_result_file_analyzer::display_results_wins_losses($result_file);
|
||||
echo pts_result_file_analyzer::display_result_file_stats_pythagorean_means($result_file);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -34,7 +34,7 @@ class result_file_to_text implements pts_option_interface
|
||||
public static function run($r)
|
||||
{
|
||||
$result_file = new pts_result_file($r[0]);
|
||||
$result_output = pts_result_file_output::result_file_to_text($result_file, pts_client::terminal_width());
|
||||
$result_output = pts_result_file_output::result_file_to_text($result_file, pts_client::terminal_width(), true);
|
||||
echo $result_output;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2009 - 2017, Phoronix Media
|
||||
Copyright (C) 2009 - 2017, Michael Larabel
|
||||
Copyright (C) 2009 - 2019, Phoronix Media
|
||||
Copyright (C) 2009 - 2019, 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
|
||||
@@ -47,7 +47,7 @@ class system_sensors implements pts_option_interface
|
||||
else
|
||||
{
|
||||
$sensor_object = new $sensor[2](0, $device);
|
||||
$tabled[] = array(pts_client::cli_just_bold(phodevi::sensor_object_name($sensor_object) . ': '), phodevi::read_sensor($sensor_object), pts_client::cli_colored_text(phodevi::read_sensor_object_unit($sensor_object), 'gray'));
|
||||
$tabled[] = array(pts_client::cli_just_italic(phodevi::sensor_object_identifier($sensor_object)) . ' ', pts_client::cli_just_bold(phodevi::sensor_object_name($sensor_object) . ': '), phodevi::read_sensor($sensor_object), pts_client::cli_colored_text(phodevi::read_sensor_object_unit($sensor_object), 'gray'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,102 +0,0 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2017 - 2018, Phoronix Media
|
||||
Copyright (C) 2017 - 2018, 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
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
class winners_and_losers implements pts_option_interface
|
||||
{
|
||||
const doc_section = 'Result Management';
|
||||
const doc_description = 'This option is used if you wish to analyze a result file to see which runs produced the most wins/losses of those result identifiers in the saved file.';
|
||||
|
||||
public static function argument_checks()
|
||||
{
|
||||
return array(
|
||||
new pts_argument_check(0, array('pts_types', 'is_result_file'), null)
|
||||
);
|
||||
}
|
||||
public static function run($args)
|
||||
{
|
||||
$result_file = new pts_result_file($args[0]);
|
||||
$result_file_identifiers = $result_file->get_system_identifiers();
|
||||
|
||||
if(count($result_file_identifiers) < 2)
|
||||
{
|
||||
echo PHP_EOL . 'There are not multiple test runs in this result file.' . PHP_EOL;
|
||||
return false;
|
||||
}
|
||||
|
||||
echo pts_client::cli_colored_text($result_file->get_title(), 'gray', true) . PHP_EOL;
|
||||
echo pts_client::cli_colored_text('RESULT COUNT: ', 'cyan', true) . $result_file->get_test_count() . PHP_EOL . PHP_EOL;
|
||||
$winners = array();
|
||||
$losers = array();
|
||||
$tests_counted = 0;
|
||||
|
||||
foreach($result_file->get_result_objects() as $result)
|
||||
{
|
||||
if($result->test_result_buffer->get_count() < 2)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$tests_counted++;
|
||||
$winner = $result->get_result_first();
|
||||
$loser = $result->get_result_last();
|
||||
|
||||
if(!isset($winners[$winner]))
|
||||
{
|
||||
$winners[$winner] = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
$winners[$winner]++;
|
||||
}
|
||||
|
||||
if(!isset($losers[$loser]))
|
||||
{
|
||||
$losers[$loser] = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
$losers[$loser]++;
|
||||
}
|
||||
}
|
||||
|
||||
arsort($winners);
|
||||
arsort($losers);
|
||||
|
||||
echo pts_client::cli_colored_text('WINS:', 'green', true) . PHP_EOL;
|
||||
$table = array();
|
||||
foreach($winners as $identifier => $count)
|
||||
{
|
||||
$table[] = array($identifier . ': ', $count, ' [' . pts_math::set_precision($count / $tests_counted * 100, 1) . '%]');
|
||||
}
|
||||
echo pts_user_io::display_text_table($table) . PHP_EOL;
|
||||
echo PHP_EOL . pts_client::cli_colored_text('LOSSES: ', 'red', true) . PHP_EOL;
|
||||
$table = array();
|
||||
foreach($losers as $identifier => $count)
|
||||
{
|
||||
$table[] = array($identifier . ': ', $count, ' [' . pts_math::set_precision($count / $tests_counted * 100, 1) . '%]');
|
||||
}
|
||||
echo pts_user_io::display_text_table($table) . PHP_EOL;
|
||||
echo PHP_EOL;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
53
pts-core/commands/wins_and_losses.php
Normal file
53
pts-core/commands/wins_and_losses.php
Normal file
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2017 - 2019, Phoronix Media
|
||||
Copyright (C) 2017 - 2019, 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
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
class wins_and_losses implements pts_option_interface
|
||||
{
|
||||
const doc_section = 'Result Management';
|
||||
const doc_description = 'This option is used if you wish to analyze a result file to see which runs produced the most wins/losses of those result identifiers in the saved file.';
|
||||
|
||||
public static function command_aliases()
|
||||
{
|
||||
return array('winners_and_losers');
|
||||
}
|
||||
public static function argument_checks()
|
||||
{
|
||||
return array(
|
||||
new pts_argument_check(0, array('pts_types', 'is_result_file'), null)
|
||||
);
|
||||
}
|
||||
public static function run($args)
|
||||
{
|
||||
$result_file = new pts_result_file($args[0]);
|
||||
echo ' ' . pts_client::cli_colored_text($result_file->get_title(), 'gray', true) . PHP_EOL . PHP_EOL;
|
||||
|
||||
if($result_file->get_system_count() < 2)
|
||||
{
|
||||
echo PHP_EOL . 'There are not multiple test runs in this result file.' . PHP_EOL;
|
||||
return false;
|
||||
}
|
||||
|
||||
echo pts_result_file_analyzer::display_results_wins_losses($result_file);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -123,17 +123,19 @@ class microsoft_dependency_handler implements pts_dependency_handler
|
||||
foreach($files_to_download as $url)
|
||||
{
|
||||
$download_destination = $download_location . basename($url);
|
||||
echo $url . PHP_EOL . ' - ' . $download_destination . PHP_EOL;
|
||||
// echo ' ' . $url . ' - ' . $download_destination . PHP_EOL;
|
||||
if(is_file($download_destination))
|
||||
{
|
||||
echo 'File Already Present' . PHP_EOL;
|
||||
}
|
||||
else
|
||||
{
|
||||
echo 'Downloading...' . PHP_EOL;
|
||||
//echo 'Downloading...' . PHP_EOL;
|
||||
$download_package = new pts_test_file_download($url);
|
||||
pts_client::$display->test_install_download_file('DOWNLOAD', $download_package);
|
||||
pts_network::download_file($url, $download_destination);
|
||||
}
|
||||
echo 'Executing...' . PHP_EOL;
|
||||
//echo 'Executing...' . PHP_EOL;
|
||||
shell_exec(basename($url));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,9 @@ if [ -x /usr/bin/aptitude ]; then
|
||||
# aptitude is nice since it doesn't fail if a non-existant package is hit
|
||||
# See: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=503215
|
||||
su -c "aptitude -y install $*"
|
||||
elif [ `whoami` = "admin" ] && [ -x /usr/bin/sudo ]; then
|
||||
# Amazon EC2 is admin user, sudo works
|
||||
sudo apt-get -y --ignore-missing install $*
|
||||
else
|
||||
su -c "apt-get -y --ignore-missing install $*"
|
||||
fi
|
||||
|
||||
@@ -3,5 +3,11 @@
|
||||
# Mandriva package installation
|
||||
|
||||
echo "Please enter your root password below:" 1>&2
|
||||
su - root -c "urpmi --auto $*"
|
||||
|
||||
if which dnf >/dev/null 2>&1 ;
|
||||
then
|
||||
su - root -c "dnf -y install $*"
|
||||
elif
|
||||
su - root -c "urpmi --auto $*"
|
||||
fi
|
||||
exit
|
||||
|
||||
@@ -9,6 +9,7 @@ elif [ `whoami` != "root" ] && [ ! -z "$DISPLAY" ]; then
|
||||
elif [ -x /usr/bin/sudo ]; then
|
||||
ROOT="/usr/bin/sudo"
|
||||
fi
|
||||
$ROOT -- su -c "apt-get -y --ignore-missing install $*"
|
||||
elif [ -z "$DISPLAY" ]; then
|
||||
sudo -- apt-get -y --ignore-missing install $*
|
||||
else
|
||||
@@ -20,6 +21,4 @@ fi
|
||||
# aptitude is nice since it doesn't fail if a non-existant package is hit
|
||||
# See: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=503215
|
||||
# $ROOT -- "aptitude -y install $*"
|
||||
#else
|
||||
$ROOT -- su -c "apt-get -y --ignore-missing install $*"
|
||||
#fi
|
||||
|
||||
@@ -208,11 +208,12 @@
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>python</GenericName>
|
||||
<PackageName>python</PackageName>
|
||||
<PackageName>python python-pip</PackageName>
|
||||
<FileCheck>pip3</FileCheck>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>yasm</GenericName>
|
||||
<PackageName>yasm</PackageName>
|
||||
<PackageName>yasm nasm</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>lib3ds</GenericName>
|
||||
@@ -302,5 +303,9 @@
|
||||
<GenericName>mongodb</GenericName>
|
||||
<PackageName>mongodb</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>node-npm</GenericName>
|
||||
<PackageName>npm</PackageName>
|
||||
</Package>
|
||||
</ExternalDependencies>
|
||||
</PhoronixTestSuite>
|
||||
|
||||
@@ -258,5 +258,9 @@
|
||||
<GenericName>mongodb</GenericName>
|
||||
<PackageName>mongodb</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>node-npm</GenericName>
|
||||
<PackageName>npm</PackageName>
|
||||
</Package>
|
||||
</ExternalDependencies>
|
||||
</PhoronixTestSuite>
|
||||
|
||||
@@ -50,8 +50,8 @@
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>build-utilities</GenericName>
|
||||
<PackageName>autoconf automake gmake bash</PackageName>
|
||||
<FileCheck>autoconf, gmake, bash</FileCheck>
|
||||
<PackageName>autoconf automake gmake bash pkgconf</PackageName>
|
||||
<FileCheck>autoconf, gmake, bash, pkgconf</FileCheck>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>nasm</GenericName>
|
||||
@@ -139,11 +139,11 @@
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>yasm</GenericName>
|
||||
<PackageName>yasm</PackageName>
|
||||
<PackageName>nasm yasm</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>gmp-library</GenericName>
|
||||
<PackageName>fgmp</PackageName>
|
||||
<PackageName>gmp</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>subversion</GenericName>
|
||||
@@ -220,5 +220,13 @@
|
||||
<GenericName>mongodb</GenericName>
|
||||
<PackageName>mongodb</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>node-npm</GenericName>
|
||||
<PackageName>npm</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>rust</GenericName>
|
||||
<PackageName>rust</PackageName>
|
||||
</Package>
|
||||
</ExternalDependencies>
|
||||
</PhoronixTestSuite>
|
||||
|
||||
@@ -254,7 +254,7 @@
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>yasm</GenericName>
|
||||
<PackageName>yasm</PackageName>
|
||||
<PackageName>yasm nasm</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>lib3ds</GenericName>
|
||||
@@ -336,5 +336,9 @@
|
||||
<GenericName>mongodb</GenericName>
|
||||
<PackageName>mongodb</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>node-npm</GenericName>
|
||||
<PackageName>npm</PackageName>
|
||||
</Package>
|
||||
</ExternalDependencies>
|
||||
</PhoronixTestSuite>
|
||||
|
||||
@@ -354,7 +354,7 @@
|
||||
<GenericName>python</GenericName>
|
||||
<Title>Python</Title>
|
||||
<PossibleNames>python</PossibleNames>
|
||||
<FileCheck>python</FileCheck>
|
||||
<FileCheck>python OR python3 OR python2</FileCheck>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>python-boost-development</GenericName>
|
||||
@@ -524,5 +524,11 @@
|
||||
<PossibleNames>mongodb</PossibleNames>
|
||||
<FileCheck>mongo</FileCheck>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>node-npm</GenericName>
|
||||
<Title>Node.js + NPM</Title>
|
||||
<PossibleNames>npm, nodejs</PossibleNames>
|
||||
<FileCheck>npm</FileCheck>
|
||||
</Package>
|
||||
</ExternalDependencies>
|
||||
</PhoronixTestSuite>
|
||||
|
||||
@@ -188,5 +188,9 @@
|
||||
<GenericName>git</GenericName>
|
||||
<PackageName>git-core</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>node-npm</GenericName>
|
||||
<PackageName>npm</PackageName>
|
||||
</Package>
|
||||
</ExternalDependencies>
|
||||
</PhoronixTestSuite>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<ExternalDependencies>
|
||||
<Information>
|
||||
<Name>Mandriva</Name>
|
||||
<Aliases>Mageia, OpenMandriva</Aliases>
|
||||
<Aliases>Mageia, OpenMandriva, OpenMandrivaLinux</Aliases>
|
||||
<PackageManager>urpmi</PackageManager>
|
||||
</Information>
|
||||
<Package>
|
||||
@@ -53,8 +53,8 @@
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>build-utilities</GenericName>
|
||||
<PackageName>task-c-devel task-c++-devel</PackageName>
|
||||
<FileCheck>/usr/bin/gcc, /usr/bin/bison, /usr/bin/flex</FileCheck>
|
||||
<PackageName>clang automake autoconf bison flex</PackageName>
|
||||
<FileCheck>/usr/bin/clang, /usr/bin/bison, /usr/bin/flex</FileCheck>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>xorg-development</GenericName>
|
||||
@@ -267,5 +267,9 @@
|
||||
<GenericName>wine</GenericName>
|
||||
<PackageName>wine</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>node-npm</GenericName>
|
||||
<PackageName>npm</PackageName>
|
||||
</Package>
|
||||
</ExternalDependencies>
|
||||
</PhoronixTestSuite>
|
||||
|
||||
@@ -18,17 +18,17 @@
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>java</GenericName>
|
||||
<PackageName>https://github.com/ojdkbuild/ojdkbuild/releases/download/10.0.1-1/java-10-openjdk-10.0.1-1.b10.ojdkbuild.windows.x86_64.msi</PackageName>
|
||||
<PackageName>https://github.com/ojdkbuild/ojdkbuild/releases/download/11.0.1-1/java-11-openjdk-11.0.1.13-1.ojdkbuild.windows.x86_64.msi</PackageName>
|
||||
<FileCheck>C:\Program Files\ojdkbuild OR C:\Program Files\Java</FileCheck>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>golang</GenericName>
|
||||
<PackageName>https://dl.google.com/go/go1.10.windows-amd64.msi</PackageName>
|
||||
<PackageName>https://dl.google.com/go/go1.11.4.windows-amd64.msi</PackageName>
|
||||
<FileCheck>C:\Go</FileCheck>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>perl</GenericName>
|
||||
<PackageName>http://strawberryperl.com/download/5.28.0.1/strawberry-perl-5.28.0.1-64bit.msi</PackageName>
|
||||
<PackageName>http://strawberryperl.com/download/5.28.1.1/strawberry-perl-5.28.1.1-64bit.msi</PackageName>
|
||||
<FileCheck>C:\Strawberry\perl\bin</FileCheck>
|
||||
</Package>
|
||||
<Package>
|
||||
@@ -38,12 +38,12 @@
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>python</GenericName>
|
||||
<PackageName>https://www.python.org/ftp/python/3.7.0/python-3.7.0-amd64.exe https://www.python.org/ftp/python/2.7.15/python-2.7.15.amd64.msi python2</PackageName>
|
||||
<PackageName>https://www.python.org/ftp/python/3.7.1/python-3.7.1-amd64.exe https://www.python.org/ftp/python/2.7.15/python-2.7.15.amd64.msi python2 python3-pip</PackageName>
|
||||
<FileCheck>C:\Python27</FileCheck>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>git</GenericName>
|
||||
<PackageName>https://github.com/git-for-windows/git/releases/download/v2.18.0.windows.1/Git-2.18.0-64-bit.exe</PackageName>
|
||||
<PackageName>https://github.com/git-for-windows/git/releases/download/v2.20.1.windows.1/Git-2.20.1-64-bit.exe</PackageName>
|
||||
<FileCheck>C:\Program Files\Git</FileCheck>
|
||||
</Package>
|
||||
<Package>
|
||||
@@ -61,5 +61,24 @@
|
||||
<PackageName>cmake</PackageName>
|
||||
<FileCheck>C:\cygwin64\bin\cmake.exe</FileCheck>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>node-npm</GenericName>
|
||||
<PackageName>https://nodejs.org/dist/latest-v11.x/node-v11.5.0-x64.msi</PackageName>
|
||||
<FileCheck>C:\Program Files\nodejs</FileCheck>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>tesseract</GenericName>
|
||||
<PackageName>https://digi.bib.uni-mannheim.de/tesseract/tesseract-ocr-w64-setup-v4.0.0.20181030.exe</PackageName>
|
||||
<FileCheck>C:\Program Files (x86)\Tesseract-OCR</FileCheck>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>rust</GenericName>
|
||||
<PackageName>https://static.rust-lang.org/dist/rust-beta-x86_64-pc-windows-msvc.msi</PackageName>
|
||||
<FileCheck>rustc.exe</FileCheck>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>opencv</GenericName>
|
||||
<PackageName>https://github.com/opencv/opencv/releases/download/3.4.3/opencv-3.4.3-vc14_vc15.exe</PackageName>
|
||||
</Package>
|
||||
</ExternalDependencies>
|
||||
</PhoronixTestSuite>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
</Information>
|
||||
<Package>
|
||||
<GenericName>common-dependencies</GenericName>
|
||||
<PackageName>dmidecode Mesa-demo-x</PackageName>
|
||||
<PackageName>Mesa-demo-x</PackageName>
|
||||
<FileCheck>glxinfo</FileCheck>
|
||||
</Package>
|
||||
<Package>
|
||||
@@ -318,5 +318,9 @@
|
||||
<GenericName>mongodb</GenericName>
|
||||
<PackageName>mongodb</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>node-npm</GenericName>
|
||||
<PackageName>npm</PackageName>
|
||||
</Package>
|
||||
</ExternalDependencies>
|
||||
</PhoronixTestSuite>
|
||||
|
||||
@@ -222,7 +222,7 @@
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>blas-development</GenericName>
|
||||
<PackageName>libblas-dev</PackageName>
|
||||
<PackageName>libblas-dev libopenblas-base libopenblas-dev</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>lapack-development</GenericName>
|
||||
@@ -269,7 +269,8 @@
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>python</GenericName>
|
||||
<PackageName>python python3-pip</PackageName>
|
||||
<PackageName>python python-pip python3-pip</PackageName>
|
||||
<FileCheck>pip3, python, python3</FileCheck>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>python-boost-development</GenericName>
|
||||
@@ -282,11 +283,11 @@
|
||||
<Package>
|
||||
<GenericName>python-numpy</GenericName>
|
||||
<PackageName>python-numpy</PackageName>
|
||||
<FileCheck>/usr/share/pyshared/numpy/version.py</FileCheck>
|
||||
<FileCheck>/usr/share/pyshared/numpy/version.py OR /usr/lib/python2.7/dist-packages/numpy/version.py</FileCheck>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>yasm</GenericName>
|
||||
<PackageName>yasm</PackageName>
|
||||
<PackageName>yasm nasm</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>gmp-library</GenericName>
|
||||
@@ -386,5 +387,9 @@
|
||||
<GenericName>mongodb</GenericName>
|
||||
<PackageName>mongodb</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>node-npm</GenericName>
|
||||
<PackageName>npm</PackageName>
|
||||
</Package>
|
||||
</ExternalDependencies>
|
||||
</PhoronixTestSuite>
|
||||
|
||||
@@ -50,18 +50,9 @@ class graphics_override extends pts_module_interface
|
||||
shell_exec("nvidia-settings --assign " . $attribute . "=" . $value . " 2>&1");
|
||||
}
|
||||
}
|
||||
public static function set_amd_pcsdb($attribute, $value)
|
||||
{
|
||||
// Sets a value for AMD's PCSDB, Persistent Configuration Store Database
|
||||
if(phodevi::is_ati_graphics() && phodevi::is_linux() && !empty($value))
|
||||
{
|
||||
$DISPLAY = substr(pts_client::read_env("DISPLAY"), 1, 1);
|
||||
$info = shell_exec("DISPLAY=:" . $DISPLAY . " aticonfig --set-pcs-val=" . $attribute . "," . $value . " 2>&1");
|
||||
}
|
||||
}
|
||||
public static function __pre_run_process()
|
||||
{
|
||||
if(!(phodevi::is_nvidia_graphics() || (phodevi::is_ati_graphics() && phodevi::is_linux())))
|
||||
if(!phodevi::is_nvidia_graphics())
|
||||
{
|
||||
echo "\nNo supported driver found for graphics_override module!\n";
|
||||
return pts_module::MODULE_UNLOAD; // Not using a supported driver, quit the module
|
||||
@@ -100,34 +91,6 @@ class graphics_override extends pts_module_interface
|
||||
self::set_nvidia_extension("FSAAAppControlled", 0);
|
||||
}
|
||||
}
|
||||
else if(phodevi::is_ati_graphics())
|
||||
{
|
||||
self::$preset_aa = phodevi_linux_parser::read_amd_pcsdb("OpenGL,AntiAliasSamples");
|
||||
self::$preset_aa_control = phodevi_linux_parser::read_amd_pcsdb("OpenGL,AAF");
|
||||
|
||||
switch($force_aa)
|
||||
{
|
||||
case 2:
|
||||
$ati_aa = "0x00000002";
|
||||
break;
|
||||
case 4:
|
||||
$ati_aa = "0x00000004";
|
||||
break;
|
||||
case 8:
|
||||
$ati_aa = "0x00000008";
|
||||
break;
|
||||
case 16:
|
||||
echo "\nThe ATI fglrx driver currently does not support 16x AA! Defaulting to 8x AA!\n";
|
||||
$ati_aa = "0x00000008";
|
||||
break;
|
||||
}
|
||||
|
||||
if(isset($ati_aa))
|
||||
{
|
||||
self::set_amd_pcsdb("OpenGL,AntiAliasSamples", $ati_aa);
|
||||
self::set_amd_pcsdb("OpenGL,AAF", "0x00000000");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if($force_af !== FALSE && in_array($force_af, self::$supported_af_levels))
|
||||
@@ -160,31 +123,6 @@ class graphics_override extends pts_module_interface
|
||||
self::set_nvidia_extension("LogAnisoAppControlled", 0);
|
||||
}
|
||||
}
|
||||
else if(phodevi::is_ati_graphics())
|
||||
{
|
||||
self::$preset_af = phodevi_linux_parser::read_amd_pcsdb("OpenGL,AnisoDegree");
|
||||
|
||||
switch($force_af)
|
||||
{
|
||||
case 2:
|
||||
$ati_af = "0x00000002";
|
||||
break;
|
||||
case 4:
|
||||
$ati_af = "0x00000004";
|
||||
break;
|
||||
case 8:
|
||||
$ati_af = "0x00000008";
|
||||
break;
|
||||
case 16:
|
||||
$ati_af = "0x00000010";
|
||||
break;
|
||||
}
|
||||
|
||||
if(isset($ati_af))
|
||||
{
|
||||
self::set_amd_pcsdb("OpenGL,AnisoDegree", $ati_af);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
public static function __post_option_process()
|
||||
@@ -202,18 +140,6 @@ class graphics_override extends pts_module_interface
|
||||
self::set_nvidia_extension("LogAnisoAppControlled", self::$preset_af_control);
|
||||
}
|
||||
}
|
||||
else if(phodevi::is_ati_graphics())
|
||||
{
|
||||
if(self::$preset_aa !== FALSE)
|
||||
{
|
||||
self::set_amd_pcsdb("OpenGL,AntiAliasSamples", self::$preset_aa);
|
||||
self::set_amd_pcsdb("OpenGL,AAF", self::$preset_aa_control);
|
||||
}
|
||||
if(self::$preset_af !== FALSE)
|
||||
{
|
||||
self::set_amd_pcsdb("OpenGL,AnisoDegree", self::$preset_af);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2017 - 2018, Phoronix Media
|
||||
Copyright (C) 2017 - 2018, Michael Larabel
|
||||
Copyright (C) 2017 - 2019, Phoronix Media
|
||||
Copyright (C) 2017 - 2019, 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
|
||||
@@ -30,6 +30,9 @@ class ob_auto_compare extends pts_module_interface
|
||||
private static $response_time = 0;
|
||||
protected static $current_result_file = null;
|
||||
|
||||
private static $longest_args_string_length = 0;
|
||||
private static $archived_percentiles = array();
|
||||
|
||||
public static function user_commands()
|
||||
{
|
||||
return array('debug' => 'debug_result_file');
|
||||
@@ -66,22 +69,24 @@ class ob_auto_compare extends pts_module_interface
|
||||
|
||||
echo PHP_EOL . PHP_EOL;
|
||||
}
|
||||
self::show_post_run_ob_percentile_summary();
|
||||
}
|
||||
protected static function request_compare(&$result_object, $system_type)
|
||||
protected static function request_compare($result_object, $system_type)
|
||||
{
|
||||
$result_file = null;
|
||||
if(true) // default to see if local comparison first
|
||||
|
||||
if(pts_network::internet_support_available())
|
||||
{
|
||||
$comparison_hash = $result_object->get_comparison_hash();
|
||||
$result_file = self::request_compare_from_ob($result_object, $comparison_hash, $system_type);
|
||||
}
|
||||
|
||||
if(empty($result_file)) // default to see if local comparison first
|
||||
{
|
||||
$comparison_hash = $result_object->get_comparison_hash(true, false);
|
||||
$result_file = self::request_compare_from_local_results($comparison_hash);
|
||||
}
|
||||
|
||||
if(empty($result_file) && pts_network::internet_support_available())
|
||||
{
|
||||
$comparison_hash = $result_object->get_comparison_hash();
|
||||
$result_file = self::request_compare_from_ob($comparison_hash, $system_type);
|
||||
}
|
||||
|
||||
return $result_file;
|
||||
}
|
||||
protected static function request_compare_from_local_results($comparison_hash)
|
||||
@@ -91,12 +96,16 @@ class ob_auto_compare extends pts_module_interface
|
||||
|
||||
foreach($saved_results as $tr)
|
||||
{
|
||||
$result_file = new pts_result_file($tr);
|
||||
$result_file = new pts_result_file($tr, true, true);
|
||||
|
||||
if(self::$current_result_file != null && self::$current_result_file == $result_file->get_identifier())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if($result_file->get_system_count() < 2)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if($result_file->get_result($comparison_hash) != false)
|
||||
{
|
||||
@@ -107,33 +116,251 @@ class ob_auto_compare extends pts_module_interface
|
||||
|
||||
return null;
|
||||
}
|
||||
protected static function request_compare_from_ob($comparison_hash, $system_type)
|
||||
protected static function show_post_run_ob_percentile_summary()
|
||||
{
|
||||
if(!pts_network::internet_support_available() || self::$response_time > 8)
|
||||
// self::$archived_percentiles[$result_object->test_profile->get_test_hardware_type()][$result_object->test_profile->get_title()][$result_object->get_arguments_description()] = $this_result_percentile;
|
||||
if(!empty(self::$archived_percentiles))
|
||||
{
|
||||
$tab = ' ';
|
||||
echo PHP_EOL . $tab . pts_client::cli_colored_text('Percentile Classification Of Current Benchmark Run', 'blue', true) . PHP_EOL;
|
||||
foreach(self::$archived_percentiles as $subsystem => $results)
|
||||
{
|
||||
echo $tab . pts_client::cli_just_bold(strtoupper($subsystem)) . PHP_EOL;
|
||||
foreach($results as $test => $tests)
|
||||
{
|
||||
echo $tab . $tab . pts_client::cli_colored_text($test, 'cyan', true) . PHP_EOL;
|
||||
foreach($tests as $args => $values)
|
||||
{
|
||||
echo $tab . $tab . $tab . $args . (!empty($args) ? ':' : ' ') . ' ' . str_repeat(' ', self::$longest_args_string_length + 1 - strlen($args)) . pts_client::cli_just_bold(pts_strings::number_suffix_handler($values)) . PHP_EOL;
|
||||
}
|
||||
}
|
||||
}
|
||||
echo $tab . $tab . $tab . str_repeat(' ', self::$longest_args_string_length + 3) . pts_client::cli_just_italic('OpenBenchmarking.org Percentile') . PHP_EOL;
|
||||
}
|
||||
}
|
||||
protected static function request_compare_from_ob(&$result_object, $comparison_hash, $system_type)
|
||||
{
|
||||
$terminal_width = pts_client::terminal_width();
|
||||
if(!pts_network::internet_support_available() || self::$response_time > 12 || $terminal_width < 60)
|
||||
{
|
||||
// If no network or OB requests are being slow...
|
||||
return false;
|
||||
}
|
||||
|
||||
$rf = null;
|
||||
$ob_request_time = time();
|
||||
$json_response = pts_openbenchmarking::make_openbenchmarking_request('auto_compare_via_hash', array('comparison_hash' => $comparison_hash, 'system_type' => $system_type));
|
||||
$ch = $result_object->get_comparison_hash(true, false);
|
||||
$test_profile = $result_object->test_profile->get_identifier(false);
|
||||
$json_response = pts_openbenchmarking::make_openbenchmarking_request('auto_compare_via_hash', array('comparison_hash' => $comparison_hash, 'system_type' => $system_type, 'test_profile' => $test_profile, 'comparison_hash_string' => $ch));
|
||||
self::$response_time = time() - $ob_request_time;
|
||||
|
||||
|
||||
$json_response = json_decode($json_response, true);
|
||||
|
||||
if(is_array($json_response) && isset($json_response['openbenchmarking']['result']['composite_xml']))
|
||||
if(is_array($json_response))
|
||||
{
|
||||
$composite_xml = $json_response['openbenchmarking']['result']['composite_xml'];
|
||||
if(!empty($composite_xml))
|
||||
if(isset($json_response['openbenchmarking']['result']['composite_xml']))
|
||||
{
|
||||
$result_file = new pts_result_file($composite_xml);
|
||||
$result_file->set_reference_id($json_response['openbenchmarking']['result']['public_id']);
|
||||
return $result_file;
|
||||
$composite_xml = $json_response['openbenchmarking']['result']['composite_xml'];
|
||||
if(!empty($composite_xml))
|
||||
{
|
||||
$result_file = new pts_result_file($composite_xml);
|
||||
$result_file->set_reference_id($json_response['openbenchmarking']['result']['public_id']);
|
||||
$rf = $result_file;
|
||||
}
|
||||
}
|
||||
|
||||
$active_result = is_object($result_object->active) ? $result_object->active->get_result() : null;
|
||||
if(empty($active_result) && $result_object->test_result_buffer->get_count() == 1)
|
||||
{
|
||||
$v = $result_object->test_result_buffer->get_values();
|
||||
$active_result = array_pop($v);
|
||||
}
|
||||
|
||||
// XXX DEBUG XXX
|
||||
//$v = $result_object->test_result_buffer->get_values();
|
||||
//$active_result = array_pop($v);
|
||||
|
||||
if(is_numeric($active_result) && $active_result > 0 && isset($json_response['openbenchmarking']['result']['ae']['percentiles']) && !empty($json_response['openbenchmarking']['result']['ae']['percentiles']) && isset($json_response['openbenchmarking']['result']['ae']['samples']))
|
||||
{
|
||||
$percentiles = $json_response['openbenchmarking']['result']['ae']['percentiles'];
|
||||
$sample_count = $json_response['openbenchmarking']['result']['ae']['samples'];
|
||||
|
||||
$box_plot = str_repeat(' ', $terminal_width - 4);
|
||||
$box_plot_size = strlen($box_plot);
|
||||
$box_plot = str_split($box_plot);
|
||||
$max_value = array_pop($percentiles);
|
||||
$results_at_pos = array(0, 1, ($box_plot_size - 1));
|
||||
|
||||
// BOX PLOT
|
||||
$whisker_bottom = $percentiles[2];
|
||||
$whisker_top = $percentiles[98];
|
||||
$whisker_start_char = round($whisker_bottom / $max_value * $box_plot_size);
|
||||
$whisker_end_char = round($whisker_top / $max_value * $box_plot_size);
|
||||
|
||||
for($i = $whisker_start_char; $i <= $whisker_end_char && $i < ($box_plot_size - 1); $i++)
|
||||
{
|
||||
$box_plot[$i] = '-';
|
||||
}
|
||||
|
||||
$box_left = floor(($percentiles[25] / $max_value) * $box_plot_size);
|
||||
$box_middle = round(($percentiles[50] / $max_value) * $box_plot_size);
|
||||
$box_right = ceil(($percentiles[75] / $max_value) * $box_plot_size);
|
||||
for($i = $box_left; $i <= $box_right; $i++)
|
||||
{
|
||||
$box_plot[$i] = '#';
|
||||
}
|
||||
$box_plot[$whisker_start_char] = '|';
|
||||
$box_plot[min($whisker_end_char, ($box_plot_size - 1))] = '|';
|
||||
$box_plot[$box_middle] = '!';
|
||||
|
||||
// END OF BOX PLOT
|
||||
if($result_object->test_profile->get_result_proportion() == 'LIB')
|
||||
{
|
||||
$box_plot = array_reverse($box_plot);
|
||||
}
|
||||
$box_plot[0] = '[';
|
||||
$box_plot[($box_plot_size - 1)] = ']';
|
||||
|
||||
$this_result_percentile = -1;
|
||||
foreach($percentiles as $percentile => $v)
|
||||
{
|
||||
if($result_object->test_profile->get_result_proportion() == 'LIB')
|
||||
{
|
||||
if($v > $active_result)
|
||||
{
|
||||
$this_result_percentile = 100 - $percentile ;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if($v > $active_result)
|
||||
{
|
||||
$this_result_percentile = $percentile - 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if($this_result_percentile > 0 && $this_result_percentile < 100)
|
||||
{
|
||||
self::$archived_percentiles[$result_object->test_profile->get_test_hardware_type()][$result_object->test_profile->get_title()][$result_object->get_arguments_description_shortened()] = $this_result_percentile;
|
||||
self::$longest_args_string_length = max(self::$longest_args_string_length, strlen($result_object->get_arguments_description_shortened()), strlen($result_object->test_profile->get_title()) - 3);
|
||||
}
|
||||
|
||||
if($active_result < $max_value)
|
||||
{
|
||||
$box_plot_complement = array();
|
||||
for($i = 0; $i < 5; $i++)
|
||||
{
|
||||
$box_plot_complement[$i] = str_repeat(' ', $terminal_width - 4);
|
||||
$box_plot_complement[$i] = str_split($box_plot_complement[$i]);
|
||||
|
||||
}
|
||||
|
||||
$reference_results_added = 0;
|
||||
$this_percentile = pts_strings::number_suffix_handler($this_result_percentile);
|
||||
foreach(array_merge(array('This Result' . ($this_percentile > 0 && $this_percentile < 100 ? ' (' . $this_percentile . ' Percentile)' : null) => ($active_result > 99 ? round($active_result) : $active_result)), (is_array($json_response['openbenchmarking']['result']['ae']['reference_results']) ? $json_response['openbenchmarking']['result']['ae']['reference_results'] : array())) as $component => $value)
|
||||
{
|
||||
if($value > $max_value)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
$this_result_pos = round($value / $max_value * $box_plot_size);
|
||||
if(in_array($this_result_pos, $results_at_pos) || (strpos($component, 'This Result') === false && !in_array($box_plot[$this_result_pos], array(' ', '-', '#'))))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
$results_at_pos[] = $this_result_pos;
|
||||
$results_at_pos[] = $this_result_pos - 1;
|
||||
$results_at_pos[] = $this_result_pos - 2;
|
||||
$results_at_pos[] = $this_result_pos - 3;
|
||||
$results_at_pos[] = $this_result_pos + 1;
|
||||
$results_at_pos[] = $this_result_pos + 2;
|
||||
|
||||
if($result_object->test_profile->get_result_proportion() == 'LIB')
|
||||
{
|
||||
$this_result_pos = $box_plot_size - $this_result_pos;
|
||||
}
|
||||
|
||||
$string_to_show_length = strlen('^ ' . $component . ': ' . $value);
|
||||
if($this_result_pos - $string_to_show_length - 3 > 4)
|
||||
{
|
||||
// print to left
|
||||
$string_to_print = $component . ': ' . $value . ' ^';
|
||||
$write_pos = ($this_result_pos - strlen($string_to_print) + 1);
|
||||
}
|
||||
else if($this_result_pos + $string_to_show_length < $terminal_width)
|
||||
{
|
||||
// print to right of line
|
||||
$string_to_print = '^ ' . $component . ': ' . $value;
|
||||
$write_pos = $this_result_pos;
|
||||
}
|
||||
else
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// validate no overwrites
|
||||
$complement_line = ($reference_results_added % 4);
|
||||
if($complement_line == 0 && strpos($component, 'This Result') === false)
|
||||
{
|
||||
$complement_line = 1;
|
||||
}
|
||||
$no_overwrites = true;
|
||||
for($i = $write_pos; $i < ($write_pos + $string_to_show_length) + 1 && isset($box_plot_complement[$complement_line][$i]); $i++)
|
||||
{
|
||||
if($box_plot_complement[$complement_line][$i] != ' ')
|
||||
{
|
||||
$no_overwrites = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if($no_overwrites == false)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
// end
|
||||
|
||||
if(strpos($component, 'This Result') !== false)
|
||||
{
|
||||
$brand_color = 'cyan';
|
||||
$string_to_print = pts_client::cli_colored_text($string_to_print, 'cyan', true);
|
||||
$box_plot[$this_result_pos] = pts_client::cli_colored_text('X', 'cyan', true);
|
||||
}
|
||||
else if(($brand_color = pts_render::identifier_to_brand_color($component, null)) != null)
|
||||
{
|
||||
$brand_color = pts_client::hex_color_to_string($brand_color);
|
||||
$string_to_print = pts_client::cli_colored_text($string_to_print, $brand_color, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
$brand_color = null;
|
||||
}
|
||||
|
||||
for($i = $write_pos; $i < ($write_pos + $string_to_show_length) && $i < count($box_plot_complement[$complement_line]); $i++)
|
||||
{
|
||||
$box_plot_complement[$complement_line][$i] = '';
|
||||
}
|
||||
|
||||
$box_plot_complement[$complement_line][$write_pos] = $string_to_print;
|
||||
$box_plot[$this_result_pos] = pts_client::cli_colored_text('*', $brand_color, false);
|
||||
$reference_results_added++;
|
||||
}
|
||||
|
||||
echo PHP_EOL;
|
||||
echo ' ' . pts_client::cli_just_italic('Result compared to ' . pts_client::cli_just_bold(number_format($sample_count)) . ' OpenBenchmarking.org samples; median: ' . pts_client::cli_just_bold(round($percentiles[50], 2)) . '. Box plot of sampling:') . PHP_EOL;
|
||||
echo ' ' . implode('', $box_plot) . PHP_EOL;
|
||||
foreach($box_plot_complement as $line_r)
|
||||
{
|
||||
$line = rtrim(implode('', $line_r));
|
||||
if(!empty($line))
|
||||
{
|
||||
echo ' ' . $line . PHP_EOL;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
return $rf;
|
||||
}
|
||||
public static function __pre_run_process($test_run_manager)
|
||||
{
|
||||
@@ -142,6 +369,14 @@ class ob_auto_compare extends pts_module_interface
|
||||
return pts_module::MODULE_UNLOAD;
|
||||
}
|
||||
self::$current_result_file = $test_run_manager->get_file_name();
|
||||
self::$archived_percentiles = array();
|
||||
}
|
||||
public static function __event_post_run_stats($test_run_manager)
|
||||
{
|
||||
if($test_run_manager->result_file->get_system_count() == 1 && $test_run_manager->result_file->get_test_count() > 3 && !empty(self::$archived_percentiles))
|
||||
{
|
||||
self::show_post_run_ob_percentile_summary();
|
||||
}
|
||||
}
|
||||
public static function __test_run_success_inline_result($result_object)
|
||||
{
|
||||
@@ -156,9 +391,10 @@ class ob_auto_compare extends pts_module_interface
|
||||
$ro = $auto_comparison_result_file->get_result($merge_ch);
|
||||
$ro->sort_results_by_performance();
|
||||
$ro->test_result_buffer->buffer_values_reverse();
|
||||
echo PHP_EOL.pts_client::cli_just_bold(' OpenBenchmarking.org Dynamic Comparison: ');
|
||||
echo pts_result_file_output::test_result_to_text($ro, pts_client::terminal_width(), true, $result_object->test_result_buffer->get_identifiers());
|
||||
echo PHP_EOL . pts_client::cli_just_bold(' Result Perspective:') . ' ' . (pts_openbenchmarking::is_string_openbenchmarking_result_id_compliant($auto_comparison_result_file->get_reference_id()) ? 'https://openbenchmarking.org/result/' : '') . $auto_comparison_result_file->get_reference_id() . PHP_EOL;
|
||||
$is_ob_comparison = pts_openbenchmarking::is_string_openbenchmarking_result_id_compliant($auto_comparison_result_file->get_reference_id());
|
||||
echo PHP_EOL.pts_client::cli_just_bold(' ' . ($is_ob_comparison ? 'OpenBenchmarking.org ' : '') . 'Dynamic Comparison: ');
|
||||
echo pts_result_file_output::test_result_to_text($ro, pts_client::terminal_width(), true, $result_object->test_result_buffer->get_identifiers(), false);
|
||||
echo PHP_EOL . pts_client::cli_just_bold(' Result Perspective:') . ' ' . ($is_ob_comparison ? 'https://openbenchmarking.org/result/' : '') . $auto_comparison_result_file->get_reference_id() . PHP_EOL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -122,7 +122,7 @@ class perf_tips extends pts_module_interface
|
||||
|
||||
if(stripos($cpu_scaling_governor, 'powersave') !== false)
|
||||
{
|
||||
$perf_tips[] = new pts_perf_tip_msg('The powersave CPU scaling governor is currently in use. It\'s possible to obtain greater performance if using the performance governor.', 'echo performance | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor', 'http://openbenchmarking.org/result/1706268-TR-CPUGOVERN32');
|
||||
$perf_tips[] = new pts_perf_tip_msg('The powersave CPU scaling governor is currently in use. It\'s possible to obtain greater performance if using the performance governor.', 'echo performance | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor', 'https://openbenchmarking.org/result/1706268-TR-CPUGOVERN32');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2008 - 2017, Phoronix Media
|
||||
Copyright (C) 2008 - 2017, Michael Larabel
|
||||
Copyright (C) 2008 - 2019, Phoronix Media
|
||||
Copyright (C) 2008 - 2019, Michael Larabel
|
||||
system_monitor.php: System sensor monitoring module for PTS
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
@@ -167,7 +167,7 @@ class system_monitor extends pts_module_interface
|
||||
self::process_perf_per_watt($result_file);
|
||||
}
|
||||
|
||||
if(self::$individual_monitoring != false)
|
||||
if(self::$individual_monitoring != false && self::$successful_test_run_request)
|
||||
{
|
||||
foreach(self::$to_monitor as $sensor)
|
||||
{
|
||||
@@ -580,7 +580,7 @@ class system_monitor extends pts_module_interface
|
||||
private static function process_perf_per_watt(&$result_file)
|
||||
{
|
||||
$sensor = array('sys', 'power');
|
||||
$sensor_results = self::parse_monitor_log('logs/' . phodevi::sensor_identifier($sensor) . '.0', self::$individual_test_run_offsets[phodevi::sensor_identifier($sensor) . '.0']);
|
||||
$sensor_results = self::parse_monitor_log('logs/' . phodevi::sensor_identifier($sensor), self::$individual_test_run_offsets[phodevi::sensor_identifier($sensor)]);
|
||||
|
||||
if(count($sensor_results) > 2 && self::$successful_test_run_request)
|
||||
{
|
||||
@@ -610,7 +610,7 @@ class system_monitor extends pts_module_interface
|
||||
{
|
||||
$test_result->test_profile->set_result_scale($test_result->test_profile->get_result_scale() . ' Per Watt');
|
||||
$test_result->test_result_buffer->add_test_result(self::$result_identifier, pts_math::set_precision($test_result->active->get_result() / $watt_average));
|
||||
$result_file->add_result($test_result);
|
||||
$ro = $result_file->add_result_return_object($test_result);
|
||||
}
|
||||
else if($test_result->test_profile->get_result_proportion() == 'LIB')
|
||||
{
|
||||
@@ -618,7 +618,11 @@ class system_monitor extends pts_module_interface
|
||||
$test_result->test_profile->set_result_proportion('HIB');
|
||||
$test_result->test_profile->set_result_scale('Performance Per Watt');
|
||||
$test_result->test_result_buffer->add_test_result(self::$result_identifier, pts_math::set_precision((1 / $test_result->active->get_result()) / $watt_average));
|
||||
$result_file->add_result($test_result);
|
||||
$ro = $result_file->add_result_return_object($test_result);
|
||||
}
|
||||
if($ro)
|
||||
{
|
||||
pts_client::$display->test_run_success_inline($ro);
|
||||
}
|
||||
self::$perf_per_watt_collection[] = $test_result->active->get_result();
|
||||
}
|
||||
@@ -631,7 +635,7 @@ class system_monitor extends pts_module_interface
|
||||
if(is_array(self::$perf_per_watt_collection) && count(self::$perf_per_watt_collection) > 2)
|
||||
{
|
||||
// Performance per watt overall
|
||||
$avg = array_sum(self::$perf_per_watt_collection) / count(self::$perf_per_watt_collection);
|
||||
$avg = pts_math::geometric_mean(self::$perf_per_watt_collection);
|
||||
$test_profile = new pts_test_profile();
|
||||
$test_result = new pts_test_result($test_profile);
|
||||
$test_result->test_profile->set_test_title('Meta Performance Per Watt');
|
||||
@@ -644,7 +648,7 @@ class system_monitor extends pts_module_interface
|
||||
$test_result->set_used_arguments_description('Performance Per Watt');
|
||||
$test_result->set_used_arguments('Per-Per-Watt');
|
||||
$test_result->test_result_buffer = new pts_test_result_buffer();
|
||||
$test_result->test_result_buffer->add_test_result(self::$result_identifier, pts_math::set_precision($avg));
|
||||
$test_result->test_result_buffer->add_test_result(self::$result_identifier, pts_math::set_precision($avg, 4));
|
||||
$test_run_manager->result_file->add_result($test_result);
|
||||
}
|
||||
}
|
||||
@@ -706,7 +710,11 @@ class system_monitor extends pts_module_interface
|
||||
$test_result->set_used_arguments_description($arguments_try_description);
|
||||
}
|
||||
|
||||
$result_file->add_result($test_result);
|
||||
$ro = $result_file->add_result_return_object($test_result);
|
||||
if($ro)
|
||||
{
|
||||
pts_client::$display->test_run_success_inline($ro);
|
||||
}
|
||||
}
|
||||
private static function prepare_per_try_results(&$sensor, &$result_buffer)
|
||||
{
|
||||
@@ -749,7 +757,11 @@ class system_monitor extends pts_module_interface
|
||||
$test_result->set_used_arguments(phodevi::sensor_object_identifier($sensor));
|
||||
$test_result->test_result_buffer = new pts_test_result_buffer();
|
||||
$test_result->test_result_buffer->add_test_result(self::$result_identifier, implode(',', $sensor_results), implode(',', $sensor_results), implode(',', $sensor_results), implode(',', $sensor_results));
|
||||
$test_run_manager->result_file->add_result($test_result);
|
||||
$ro = $test_run_manager->result_file->add_result_return_object($test_result);
|
||||
if($ro)
|
||||
{
|
||||
pts_client::$display->test_run_success_inline($ro);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2009 - 2018, Phoronix Media
|
||||
Copyright (C) 2009 - 2018, Michael Larabel
|
||||
Copyright (C) 2009 - 2019, Phoronix Media
|
||||
Copyright (C) 2009 - 2019, Michael Larabel
|
||||
pts_concise_display_mode.php: The batch / concise display mode
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
@@ -41,6 +41,7 @@ class pts_concise_display_mode implements pts_display_mode_interface
|
||||
private $expected_trial_run_count = 0;
|
||||
private $trial_run_count_current = 0;
|
||||
private $current_saved_test_identifier = null;
|
||||
private $current_test = null;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
@@ -309,6 +310,7 @@ class pts_concise_display_mode implements pts_display_mode_interface
|
||||
public function test_run_start(&$test_run_manager, &$test_result)
|
||||
{
|
||||
$this->current_saved_test_identifier = $test_run_manager->get_results_identifier();
|
||||
$this->current_test = $test_result->test_profile->get_identifier();
|
||||
$test_title_string = $test_result->test_profile->get_title() . ($test_result->test_profile->get_app_version() != null ? ' ' . $test_result->test_profile->get_app_version() : null) . ':' . PHP_EOL . $this->tab . $test_result->test_profile->get_identifier();
|
||||
|
||||
if(($test_description = $test_result->get_arguments_description()) != false)
|
||||
@@ -325,6 +327,12 @@ class pts_concise_display_mode implements pts_display_mode_interface
|
||||
$estimated_length = $test_result->test_profile->get_estimated_run_time();
|
||||
$display_table = array();
|
||||
|
||||
|
||||
if($test_result->test_profile->get_status() != 'Verified' && $test_result->test_profile->get_status() != '')
|
||||
{
|
||||
array_push($display_table, array($this->tab . 'Test Profile Status:', pts_client::cli_just_italic($test_result->test_profile->get_status())));
|
||||
}
|
||||
|
||||
array_push($display_table, array($this->tab . 'Estimated Trial Run Count:', $this->expected_trial_run_count));
|
||||
|
||||
if($estimated_length > 1 && $estimated_length != $remaining_length)
|
||||
@@ -491,10 +499,15 @@ class pts_concise_display_mode implements pts_display_mode_interface
|
||||
}
|
||||
public function test_run_success_inline($test_result_orig)
|
||||
{
|
||||
if($test_result_orig->test_result_buffer->get_count() < 2)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$test_result = clone $test_result_orig;
|
||||
$test_result->sort_results_by_performance();
|
||||
$test_result->test_result_buffer->buffer_values_reverse();
|
||||
echo pts_result_file_output::test_result_to_text($test_result, pts_client::terminal_width(), true, $this->current_saved_test_identifier);
|
||||
echo pts_result_file_output::test_result_to_text($test_result, pts_client::terminal_width(), true, $this->current_saved_test_identifier, ($test_result->test_profile->get_identifier() == null || $this->current_test != $test_result->test_profile->get_identifier()));
|
||||
echo PHP_EOL;
|
||||
}
|
||||
public function test_run_error($error_string)
|
||||
@@ -545,7 +558,7 @@ class pts_concise_display_mode implements pts_display_mode_interface
|
||||
}
|
||||
public function triggered_system_error($level, $message, $file, $line)
|
||||
{
|
||||
$error_msg = PHP_EOL . '[' . $level . '] ';
|
||||
$error_msg = PHP_EOL . $this->tab . '[' . $level . '] ';
|
||||
if(strpos($message, PHP_EOL) === false)
|
||||
{
|
||||
$error_msg .= $message . ' ';
|
||||
|
||||
@@ -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 - 2019, Phoronix Media
|
||||
Copyright (C) 2008 - 2019, 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
|
||||
@@ -268,6 +268,7 @@ class pts_client
|
||||
'PTS_LAUNCHER' => getenv('PTS_LAUNCHER'),
|
||||
'PHP_BIN' => PHP_BIN,
|
||||
'NUM_CPU_CORES' => phodevi::read_property('cpu', 'core-count'),
|
||||
'NUM_CPU_PHYSICAL_CORES' => phodevi::read_property('cpu', 'physical-core-count'),
|
||||
'NUM_CPU_NODES' => phodevi::read_property('cpu', 'node-count'),
|
||||
'NUM_CPU_JOBS' => (phodevi::read_property('cpu', 'core-count') * 2),
|
||||
'SYS_MEMORY' => phodevi::read_property('memory', 'capacity'),
|
||||
@@ -283,15 +284,24 @@ class pts_client
|
||||
'OS_TYPE' => phodevi::os_under_test(),
|
||||
'THIS_RUN_TIME' => PTS_INIT_TIME,
|
||||
'DEBUG_REAL_HOME' => pts_core::user_home_directory(),
|
||||
'DEBUG_PATH' => pts_client::get_path(),
|
||||
'SYSTEM_TYPE_ID' => phodevi_base::determine_system_type(phodevi::system_hardware(), phodevi::system_software()),
|
||||
'SYSTEM_TYPE' => phodevi_base::system_type_to_string(phodevi_base::determine_system_type(phodevi::system_hardware(), phodevi::system_software())),
|
||||
'TERMINAL_WIDTH' => pts_client::terminal_width(),
|
||||
'C_CXX_FLAGS_DEFAULT' => '-O3 -march=native' // mostly for future use
|
||||
);
|
||||
|
||||
if(!pts_client::executable_in_path('cc') && pts_client::executable_in_path('gcc') && getenv('CC') == false)
|
||||
if(!pts_client::executable_in_path('cc') && getenv('CC') == false)
|
||||
{
|
||||
// This helps some test profiles build correctly if they don't do a cc check internally
|
||||
$env_variables['CC'] = 'gcc';
|
||||
if(pts_client::executable_in_path('gcc'))
|
||||
{
|
||||
$env_variables['CC'] = 'gcc';
|
||||
}
|
||||
else if(pts_client::executable_in_path('clang'))
|
||||
{
|
||||
$env_variables['CC'] = 'clang';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -377,6 +387,12 @@ class pts_client
|
||||
|
||||
return $supported;
|
||||
}
|
||||
public static function hex_color_to_string($hex)
|
||||
{
|
||||
$colors = array();
|
||||
list($colors['red'], $colors['green'], $colors['blue']) = sscanf($hex, "#%02x%02x%02x");
|
||||
return array_search(max($colors), $colors);
|
||||
}
|
||||
public static function cli_colored_text($str, $color, $bold = false)
|
||||
{
|
||||
if(!self::supports_colored_text_output() || empty($color))
|
||||
@@ -389,10 +405,12 @@ class pts_client
|
||||
'black' => $attribute . ';30',
|
||||
'gray' => '1;30', // gray not bold doesn't look good in all consoles
|
||||
'blue' => $attribute . ';34',
|
||||
'magenta' => $attribute . ';35',
|
||||
'green' => $attribute . ';32',
|
||||
'yellow' => $attribute . ';33',
|
||||
'red' => $attribute . ';31',
|
||||
'cyan' => $attribute . ';36',
|
||||
'white' => $attribute . ';37',
|
||||
);
|
||||
|
||||
if(!isset($colors[$color]))
|
||||
@@ -944,7 +962,7 @@ class pts_client
|
||||
if($prompt_in_method == false || $usage_reporting == -1)
|
||||
{
|
||||
pts_client::$display->generic_heading('User Agreement');
|
||||
echo wordwrap($user_agreement, 65);
|
||||
echo wordwrap($user_agreement, (pts_client::terminal_width() - 2));
|
||||
$agree = pts_user_io::prompt_bool_input('Do you agree to these terms and wish to proceed', -1);
|
||||
|
||||
$usage_reporting = $agree ? pts_user_io::prompt_bool_input('Enable anonymous usage / statistics reporting', -1) : -1;
|
||||
@@ -1472,7 +1490,9 @@ class pts_client
|
||||
{
|
||||
static $terminal_width = null;
|
||||
|
||||
if($terminal_width == null)
|
||||
// XXX As of PTS 8.6.1, no longer caching this as not sure it makes sense to do... So be more responsive about terminal resizing
|
||||
// Or at least cache on Windows where powershell calls can take longer
|
||||
if(!phodevi::is_windows() || $terminal_width == null)
|
||||
{
|
||||
$terminal_width = 80;
|
||||
|
||||
@@ -1489,7 +1509,7 @@ class pts_client
|
||||
{
|
||||
$terminal_width = explode(' ', trim(shell_exec('stty size 2>&1')));
|
||||
|
||||
if(count($terminal_width) == 2 && is_numeric($terminal_width[1]) && $terminal_width[1] >= 80)
|
||||
if(count($terminal_width) == 2 && is_numeric($terminal_width[1]) && $terminal_width[1] >= 40)
|
||||
{
|
||||
$terminal_width = $terminal_width[1];
|
||||
}
|
||||
@@ -1723,6 +1743,10 @@ class pts_client
|
||||
}
|
||||
return $path;
|
||||
}
|
||||
public static function get_path_separator()
|
||||
{
|
||||
return phodevi::is_windows() ? ';' : ':';
|
||||
}
|
||||
public static function executable_in_path($executable, $ignore_paths_with = false)
|
||||
{
|
||||
static $cache = null;
|
||||
@@ -1730,7 +1754,7 @@ class pts_client
|
||||
if(!isset($cache[$executable]) || empty($cache[$executable]) || $ignore_paths_with)
|
||||
{
|
||||
$path = pts_client::get_path();
|
||||
$paths = pts_strings::trim_explode((phodevi::is_windows() ? ';' : ':'), $path);
|
||||
$paths = pts_strings::trim_explode(pts_client::get_path_separator(), $path);
|
||||
$executable_path = false;
|
||||
|
||||
foreach($paths as $path)
|
||||
|
||||
@@ -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 - 2019, Phoronix Media
|
||||
Copyright (C) 2008 - 2019, 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
|
||||
@@ -118,6 +118,7 @@ class pts_config
|
||||
$config->addXmlNodeFromReader('PhoronixTestSuite/Options/Testing/ResultsDirectory', $read_config);
|
||||
$config->addXmlNodeFromReader('PhoronixTestSuite/Options/Testing/AlwaysUploadResultsToOpenBenchmarking', $read_config);
|
||||
$config->addXmlNodeFromReader('PhoronixTestSuite/Options/Testing/AutoSortRunQueue', $read_config);
|
||||
$config->addXmlNodeFromReader('PhoronixTestSuite/Options/Testing/ShowPostRunStatistics', $read_config);
|
||||
|
||||
$config->addXmlNodeFromReader('PhoronixTestSuite/Options/TestResultValidation/DynamicRunCount', $read_config);
|
||||
$config->addXmlNodeFromReader('PhoronixTestSuite/Options/TestResultValidation/LimitDynamicToTestLength', $read_config);
|
||||
|
||||
@@ -134,7 +134,7 @@ class pts_documentation
|
||||
}
|
||||
public static function basic_description()
|
||||
{
|
||||
return 'The **Phoronix Test Suite** is the most comprehensive testing and benchmarking platform available for Linux, Solaris, OS X, and BSD operating systems. The Phoronix Test Suite allows for carrying out tests in a fully automated manner from test installation to execution and reporting. All tests are meant to be easily reproducible, easy-to-use, and support fully automated execution. The Phoronix Test Suite is open-source under the GNU GPLv3 license and is developed by Phoronix Media in cooperation with partners.';
|
||||
return 'The **Phoronix Test Suite** is the most comprehensive testing and benchmarking platform available for Linux, Solaris, macOS, Windows, and BSD operating systems. The Phoronix Test Suite allows for carrying out tests in a fully automated manner from test installation to execution and reporting. All tests are meant to be easily reproducible, easy-to-use, and support fully automated execution. The Phoronix Test Suite is open-source under the GNU GPLv3 license and is developed by Phoronix Media in cooperation with partners.';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -443,7 +443,7 @@ class pts_external_dependencies
|
||||
if(substr($file[$i], -2) == '.h' || substr($file[$i], -4) == '.hpp')
|
||||
{
|
||||
// May just be a relative header file to look for...
|
||||
$possible_paths = array('/usr/local/include/', '/usr/target/include/', '/usr/include/', '/usr/include/x86_64-linux-gnu/');
|
||||
$possible_paths = array('/usr/local/include/', '/usr/target/include/', '/usr/include/', '/usr/include/x86_64-linux-gnu/', '/usr/include/powerpc64le-linux-gnu/');
|
||||
foreach($possible_paths as $path)
|
||||
{
|
||||
if(is_file($path . $file[$i]) || is_link($path . $file[$i]))
|
||||
@@ -455,7 +455,7 @@ class pts_external_dependencies
|
||||
else if(strpos($file[$i], '.so') !== false || substr($file[$i], -2) == '.a')
|
||||
{
|
||||
// May just be a relative shared library to look for...
|
||||
$possible_paths = array('/usr/local/lib/', '/usr/lib/', '/usr/lib64/', '/usr/lib/x86_64-linux-gnu/', '/usr/lib/i386-linux-gnu/', '/usr/lib/arm-linux-gnueabihf/');
|
||||
$possible_paths = array('/usr/local/lib/', '/usr/lib/', '/usr/lib64/', '/usr/lib/x86_64-linux-gnu/', '/usr/lib/i386-linux-gnu/', '/usr/lib/arm-linux-gnueabihf/', '/usr/lib/powerpc64le-linux-gnu/');
|
||||
|
||||
if(getenv('LD_LIBRARY_PATH'))
|
||||
{
|
||||
@@ -494,7 +494,7 @@ class pts_external_dependencies
|
||||
$pkg_vendor = self::vendor_identifier('package-list');
|
||||
|
||||
// Rebuild the array index since some OS package XML tags provide multiple package names in a single string
|
||||
$os_packages_to_install = explode(' ', implode(' ', $os_packages_to_install));
|
||||
$os_packages_to_install = array_unique(explode(' ', implode(' ', $os_packages_to_install)));
|
||||
|
||||
if(is_file($vendor_install_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 - 2019, Phoronix Media
|
||||
Copyright (C) 2008 - 2019, Michael Larabel
|
||||
pts_module_interface.php: The generic Phoronix Test Suite module object that is extended by the specific modules/plug-ins
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
@@ -211,6 +211,11 @@ class pts_module_interface
|
||||
// Passed is a copy of the pts_test_run_manager
|
||||
return;
|
||||
}
|
||||
public static function __event_post_run_stats($obj = null)
|
||||
{
|
||||
// Passed is a copy of the pts_test_run_manager for showing any post-run statistics
|
||||
return;
|
||||
}
|
||||
public static function __event_user_error($obj = null)
|
||||
{
|
||||
// TODO use __event_user_error
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2010 - 2017, Phoronix Media
|
||||
Copyright (C) 2010 - 2017, Michael Larabel
|
||||
Copyright (C) 2010 - 2019, Phoronix Media
|
||||
Copyright (C) 2010 - 2019, 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
|
||||
@@ -194,7 +194,7 @@ class pts_openbenchmarking_client
|
||||
}
|
||||
if(isset($json_response['openbenchmarking']['upload']['url']))
|
||||
{
|
||||
echo PHP_EOL . pts_client::cli_just_bold('Results Uploaded To: ') . $json_response['openbenchmarking']['upload']['url'] . PHP_EOL;
|
||||
echo PHP_EOL . ' ' . pts_client::cli_just_bold('Results Uploaded To: ') . $json_response['openbenchmarking']['upload']['url'] . PHP_EOL;
|
||||
pts_module_manager::module_process('__event_openbenchmarking_upload', $json_response);
|
||||
}
|
||||
//$json['openbenchmarking']['upload']['id']
|
||||
@@ -244,6 +244,39 @@ class pts_openbenchmarking_client
|
||||
|
||||
return $available_tests;
|
||||
}
|
||||
public static function recently_added_tests($limit = -1)
|
||||
{
|
||||
$available_tests = array();
|
||||
|
||||
foreach(pts_openbenchmarking::linked_repositories() as $repo)
|
||||
{
|
||||
$repo_index = pts_openbenchmarking::read_repository_index($repo);
|
||||
|
||||
if(isset($repo_index['tests']) && is_array($repo_index['tests']))
|
||||
{
|
||||
foreach(array_keys($repo_index['tests']) as $identifier)
|
||||
{
|
||||
if($repo_index['tests'][$identifier]['title'] == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$version = array_shift($repo_index['tests'][$identifier]['versions']);
|
||||
$add_time = $repo_index['tests'][$identifier]['first_added'];
|
||||
$available_tests[$add_time] = $repo . '/' . $identifier . '-' . $version;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
krsort($available_tests);
|
||||
|
||||
if($limit > 0)
|
||||
{
|
||||
$available_tests = array_slice($available_tests, 0, $limit, true);
|
||||
}
|
||||
|
||||
return $available_tests;
|
||||
}
|
||||
public static function popular_tests($limit = -1, $test_type = null)
|
||||
{
|
||||
$available_tests = array();
|
||||
|
||||
@@ -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 - 2019, Phoronix Media
|
||||
Copyright (C) 2008 - 2019, 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
|
||||
@@ -141,7 +141,7 @@ class pts_test_execution
|
||||
$cache_share = new pts_storage_object(false, false);
|
||||
}
|
||||
|
||||
if($test_run_manager->get_results_identifier() != null && $test_run_manager->get_file_name() != null && pts_config::read_bool_config('PhoronixTestSuite/Options/Testing/SaveTestLogs', 'FALSE'))
|
||||
if($test_run_manager->do_save_results() && $test_run_manager->get_file_name() != null && pts_config::read_bool_config('PhoronixTestSuite/Options/Testing/SaveTestLogs', 'FALSE'))
|
||||
{
|
||||
$backup_test_log_dir = PTS_SAVE_RESULTS_PATH . $test_run_manager->get_file_name() . '/test-logs/active/' . $test_run_manager->get_results_identifier() . '/';
|
||||
pts_file_io::delete($backup_test_log_dir);
|
||||
@@ -173,6 +173,11 @@ class pts_test_execution
|
||||
pts_client::test_profile_debug_message('Log File: ' . $test_log_file);
|
||||
}
|
||||
}
|
||||
else if(phodevi::is_windows() && strpos($test_directory, ' ') !== false)
|
||||
{
|
||||
// On Windows systems with a space in the directory, to workaround some scripts easiest just punting the log file into temp dir
|
||||
$test_log_file = sys_get_temp_dir() . '\\' . basename($test_identifier) . '-' . $runtime_identifier . '-' . ($i + 1) . '.log';
|
||||
}
|
||||
else
|
||||
{
|
||||
$test_log_file = $test_directory . basename($test_identifier) . '-' . $runtime_identifier . '-' . ($i + 1) . '.log';
|
||||
@@ -245,6 +250,7 @@ class pts_test_execution
|
||||
$use_phoroscript = false;
|
||||
$test_extra_runtime_variables['PATH'] = (isset($test_extra_runtime_variables['PATH']) ? $test_extra_runtime_variables['PATH'] : null) . ';C:\cygwin64\bin';
|
||||
}
|
||||
$execute_binary = '"' . $execute_binary . '"';
|
||||
}
|
||||
|
||||
$is_monitoring = pts_test_result_parser::system_monitor_task_check($test_run_request);
|
||||
@@ -266,7 +272,20 @@ class pts_test_execution
|
||||
{
|
||||
$to_exec = '';
|
||||
}
|
||||
$test_process = proc_open($test_prepend . $to_exec . ' ' . $execute_binary_prepend . './' . $execute_binary . ' ' . $pts_test_arguments . $post_test_args, $descriptorspec, $pipes, $to_execute, array_merge($host_env, pts_client::environmental_variables(), $test_extra_runtime_variables));
|
||||
|
||||
$terv = $test_extra_runtime_variables;
|
||||
if(phodevi::is_windows())
|
||||
{
|
||||
foreach($terv as $terv_i => &$value)
|
||||
{
|
||||
if((is_dir($value) || is_file($value) || $terv_i == 'LOG_FILE') && strpos($value, ' ') !== false)
|
||||
{
|
||||
$value = '"' . $value . '"';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$test_process = proc_open($test_prepend . $to_exec . ' ' . $execute_binary_prepend . './' . $execute_binary . ' ' . $pts_test_arguments . $post_test_args, $descriptorspec, $pipes, $to_execute, array_merge($host_env, pts_client::environmental_variables(), $terv));
|
||||
|
||||
if(is_resource($test_process))
|
||||
{
|
||||
@@ -538,7 +557,7 @@ class pts_test_execution
|
||||
unset($cache_share);
|
||||
}
|
||||
|
||||
if($test_run_manager->get_results_identifier() != null && (pts_config::read_bool_config('PhoronixTestSuite/Options/Testing/SaveInstallationLogs', 'FALSE')))
|
||||
if($test_run_manager->do_save_results() && (pts_config::read_bool_config('PhoronixTestSuite/Options/Testing/SaveInstallationLogs', 'FALSE')))
|
||||
{
|
||||
if(is_file($test_run_request->test_profile->get_install_dir() . 'install.log'))
|
||||
{
|
||||
@@ -783,43 +802,36 @@ class pts_test_execution
|
||||
pts_module_manager::module_process('__post_test_run_success', $test_result);
|
||||
$test_successful = true;
|
||||
|
||||
if($test_run_manager->get_results_identifier() != null)
|
||||
if($generated_result_count >= 1)
|
||||
{
|
||||
if($generated_result_count >= 1)
|
||||
// Prior to PTS 8.6, secondary result graphs wouldn't have their test profile identifier set but would be null
|
||||
// With PTS 8.6+, the identifier is now preserved... Except with below logic for preserving compatibility with older result files, only clear the identifier if comparing against an old result file having a match for no identifier set
|
||||
$ti_backup = $test_result->test_profile->get_identifier();
|
||||
$test_result->test_profile->set_identifier('');
|
||||
if(!$test_run_manager->result_file->result_hash_exists($test_result))
|
||||
{
|
||||
// No reason to have more than one identifier
|
||||
// TODO XXX may want to rethink this behavior, we'll see...
|
||||
$test_result->test_profile->set_identifier('');
|
||||
$test_result->test_profile->set_identifier($ti_backup);
|
||||
}
|
||||
|
||||
$test_result->test_result_buffer = new pts_test_result_buffer();
|
||||
$test_result->test_result_buffer->add_test_result($test_run_manager->get_results_identifier(), $test_result->active->get_result(), $test_result->active->get_values_as_string(), pts_test_run_manager::process_json_report_attributes($test_result), $test_result->active->get_min_result(), $test_result->active->get_max_result());
|
||||
$added_comparison_hash = $test_run_manager->result_file->add_result($test_result);
|
||||
$generated_result_count++;
|
||||
|
||||
// The merged data, get back the merged test_result object
|
||||
$results_comparison = clone $test_run_manager->result_file->get_result($added_comparison_hash);
|
||||
if($results_comparison && $results_comparison->test_result_buffer->get_count() > 1)
|
||||
{
|
||||
pts_client::$display->test_run_success_inline($results_comparison);
|
||||
}
|
||||
pts_module_manager::module_process('__test_run_success_inline_result', $results_comparison);
|
||||
}
|
||||
else
|
||||
|
||||
$test_result->test_result_buffer = new pts_test_result_buffer();
|
||||
$rid = $test_run_manager->get_results_identifier() != null ? $test_run_manager->get_results_identifier() : 'Result';
|
||||
$test_result->test_result_buffer->add_test_result($rid, $test_result->active->get_result(), $test_result->active->get_values_as_string(), pts_test_run_manager::process_json_report_attributes($test_result), $test_result->active->get_min_result(), $test_result->active->get_max_result());
|
||||
$added_comparison_hash = $test_run_manager->result_file->add_result($test_result);
|
||||
$generated_result_count++;
|
||||
|
||||
// The merged data, get back the merged test_result object
|
||||
$results_comparison = clone $test_run_manager->result_file->get_result($added_comparison_hash);
|
||||
if($results_comparison && $results_comparison->test_result_buffer->get_count() > 1)
|
||||
{
|
||||
// Not a saved result
|
||||
$test_result->test_result_buffer = new pts_test_result_buffer();
|
||||
$test_result->test_result_buffer->add_test_result('Result', $test_result->active->get_result(), $test_result->active->get_values_as_string(), pts_test_run_manager::process_json_report_attributes($test_result), $test_result->active->get_min_result(), $test_result->active->get_max_result());
|
||||
$temp_result_file = new pts_result_file(null);
|
||||
$added_comparison_hash = $temp_result_file->add_result($test_result);
|
||||
$results_comparison = clone $temp_result_file->get_result($added_comparison_hash);
|
||||
pts_module_manager::module_process('__test_run_success_inline_result', $results_comparison);
|
||||
pts_client::$display->test_run_success_inline($results_comparison);
|
||||
}
|
||||
pts_module_manager::module_process('__test_run_success_inline_result', $results_comparison);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if($test_run_manager->get_results_identifier() != null && $test_run_manager->get_file_name() != null && pts_config::read_bool_config('PhoronixTestSuite/Options/Testing/SaveTestLogs', 'FALSE'))
|
||||
if($test_run_manager->do_save_results() && $test_run_manager->get_file_name() != null && pts_config::read_bool_config('PhoronixTestSuite/Options/Testing/SaveTestLogs', 'FALSE'))
|
||||
{
|
||||
static $xml_write_pos = 1;
|
||||
pts_file_io::mkdir(PTS_SAVE_RESULTS_PATH . $test_run_manager->get_file_name() . '/test-logs/' . $xml_write_pos . '/');
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2010 - 2018, Phoronix Media
|
||||
Copyright (C) 2010 - 2018, Michael Larabel
|
||||
Copyright (C) 2010 - 2019, Phoronix Media
|
||||
Copyright (C) 2010 - 2019, 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
|
||||
@@ -44,6 +44,19 @@ class pts_test_installer
|
||||
$unknown_tests = array();
|
||||
$test_profiles = pts_types::identifiers_to_test_profile_objects($items_to_install, true, true, $unknown_tests);
|
||||
|
||||
if($force_install == false)
|
||||
{
|
||||
foreach($test_profiles as $i => $tp)
|
||||
{
|
||||
$valid = pts_test_run_manager::test_profile_system_compatibility_check($tp, true);
|
||||
if($valid == false)
|
||||
{
|
||||
unset($test_profiles[$i]);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Any external dependencies?
|
||||
pts_external_dependencies::install_dependencies($test_profiles, $no_prompts, $skip_tests_with_missing_dependencies);
|
||||
|
||||
@@ -67,12 +80,6 @@ class pts_test_installer
|
||||
}
|
||||
public static function start_install(&$test_profiles, &$unknown_tests = null, $force_install = false, $no_prompts = false)
|
||||
{
|
||||
if(count($test_profiles) == 0)
|
||||
{
|
||||
trigger_error('No Tests Found For Installation.', E_USER_ERROR);
|
||||
return false;
|
||||
}
|
||||
|
||||
// Setup the install manager and add the tests
|
||||
$test_install_manager = new pts_test_install_manager();
|
||||
$install_table = array();
|
||||
@@ -581,6 +588,12 @@ class pts_test_installer
|
||||
}
|
||||
*/
|
||||
|
||||
// Since GCC POWER doesn't support -march=, in the compiler mask we can change it to -mcpu= before passed to the actual compiler
|
||||
if(strpos(phodevi::read_property('system', 'kernel-architecture'), 'ppc') !== false && pts_client::executable_in_path('sed'))
|
||||
{
|
||||
$env_var_check .= 'COMPILER_OPTIONS=`echo "$COMPILER_OPTIONS" | sed -e "s/\-march=/-mcpu=/g"`' . PHP_EOL;
|
||||
}
|
||||
|
||||
if(is_executable('/bin/bash'))
|
||||
{
|
||||
$shebang = '/bin/bash';
|
||||
@@ -600,7 +613,12 @@ class pts_test_installer
|
||||
|
||||
// Write the main mask for the compiler
|
||||
file_put_contents($main_compiler,
|
||||
'#!' . $shebang . PHP_EOL . 'COMPILER_OPTIONS="$@"' . PHP_EOL . $env_var_check . PHP_EOL . 'echo $COMPILER_OPTIONS >> ' . $mask_dir . $compiler_type . '-options-' . $compiler_name . PHP_EOL . $compiler_path . ' "$@"' . PHP_EOL);
|
||||
'#!' . $shebang . PHP_EOL .
|
||||
'COMPILER_OPTIONS="$@"' . PHP_EOL .
|
||||
$env_var_check . PHP_EOL .
|
||||
'echo $COMPILER_OPTIONS >> ' . $mask_dir . $compiler_type . '-options-' . $compiler_name . PHP_EOL .
|
||||
$compiler_path . ' "$@"' . PHP_EOL .
|
||||
PHP_EOL);
|
||||
|
||||
// Make executable
|
||||
chmod($main_compiler, 0755);
|
||||
@@ -887,7 +905,7 @@ class pts_test_installer
|
||||
$identifier = $test_install_request->test_profile->get_identifier();
|
||||
pts_file_io::mkdir($test_install_request->test_profile->get_install_dir());
|
||||
|
||||
if($remove_old_files)
|
||||
if($remove_old_files && $test_install_request->test_profile->do_remove_test_install_directory_on_reinstall())
|
||||
{
|
||||
// Remove any (old) files that were installed
|
||||
$ignore_files = array('pts-install.xml', 'install-failed.log');
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2009 - 2018, Phoronix Media
|
||||
Copyright (C) 2009 - 2018, Michael Larabel
|
||||
Copyright (C) 2009 - 2019, Phoronix Media
|
||||
Copyright (C) 2009 - 2019, 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
|
||||
@@ -31,6 +31,7 @@ class pts_test_run_manager
|
||||
protected $last_test_run_index = 0;
|
||||
protected $test_run_pos = 0;
|
||||
protected $test_run_count = 0;
|
||||
protected $loop_run_pos = 1;
|
||||
|
||||
protected $file_name = null;
|
||||
protected $file_name_title = null;
|
||||
@@ -68,6 +69,7 @@ class pts_test_run_manager
|
||||
$this->dynamic_run_count_std_deviation_threshold = pts_config::read_user_config('PhoronixTestSuite/Options/TestResultValidation/StandardDeviationThreshold', 3.50);
|
||||
$this->dynamic_run_count_export_script = pts_config::read_user_config('PhoronixTestSuite/Options/TestResultValidation/ExportResultsTo', null);
|
||||
$this->drop_noisy_results = pts_config::read_bool_config('PhoronixTestSuite/Options/TestResultValidation/DropNoisyResults', 'FALSE');
|
||||
$this->result_file = new pts_result_file(null);
|
||||
|
||||
if($batch_mode)
|
||||
{
|
||||
@@ -299,18 +301,17 @@ class pts_test_run_manager
|
||||
}
|
||||
public function result_already_contains_identifier()
|
||||
{
|
||||
if($this->result_file)
|
||||
$contains = false;
|
||||
foreach($this->result_file->get_systems() as $s)
|
||||
{
|
||||
foreach($this->result_file->get_systems() as $s)
|
||||
if($s->get_identifier() == $this->results_identifier)
|
||||
{
|
||||
if($s->get_identifier() == $this->results_identifier)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
$contains = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
return $contains;
|
||||
}
|
||||
public function set_save_name($save_name, $is_new_save = true)
|
||||
{
|
||||
@@ -353,7 +354,7 @@ class pts_test_run_manager
|
||||
// Be of help to the user by showing recently saved test results
|
||||
if($save_name == null)
|
||||
{
|
||||
pts_tests::recently_saved_results();
|
||||
pts_tests::recently_saved_results(' ');
|
||||
|
||||
}
|
||||
$save_name_length = strlen($save_name);
|
||||
@@ -369,7 +370,7 @@ class pts_test_run_manager
|
||||
echo PHP_EOL . 'The name of the saved file must have between 2 and 126 characters in length.' . PHP_EOL;
|
||||
}
|
||||
|
||||
$prompt = 'Enter a name for the result file: ';
|
||||
$prompt = ' Enter a name for the result file: ';
|
||||
if(function_exists('readline') && function_exists('readline_completion_function'))
|
||||
{
|
||||
pts_user_io::$readline_completion_possibilities = pts_tests::test_results_by_date();
|
||||
@@ -452,7 +453,7 @@ class pts_test_run_manager
|
||||
}
|
||||
else
|
||||
{
|
||||
$prompt = 'Enter a unique name to describe this test run / configuration: ';
|
||||
$prompt = ' Enter a unique name to describe this test run / configuration: ';
|
||||
if(function_exists('readline') && function_exists('readline_completion_function'))
|
||||
{
|
||||
pts_user_io::$readline_completion_possibilities = array_map(array('pts_strings', 'trim_search_query'), array_merge(phodevi::system_hardware(false), phodevi::system_software(false)));
|
||||
@@ -555,7 +556,7 @@ class pts_test_run_manager
|
||||
}
|
||||
public function get_test_run_position()
|
||||
{
|
||||
return $this->test_run_pos + 1;
|
||||
return ($this->get_test_count() * ($this->loop_run_pos - 1)) + $this->test_run_pos + 1;
|
||||
}
|
||||
public function get_test_run_count_reported()
|
||||
{
|
||||
@@ -589,6 +590,7 @@ class pts_test_run_manager
|
||||
|
||||
for($loop = 1; $loop <= $total_loop_count && $continue_test_flag; $loop++)
|
||||
{
|
||||
$this->loop_run_pos = $loop;
|
||||
for($i = 0; $i < $tests_to_run_count && $continue_test_flag; $i++)
|
||||
{
|
||||
$this->test_run_pos = $i;
|
||||
@@ -663,7 +665,7 @@ class pts_test_run_manager
|
||||
echo PHP_EOL . PHP_EOL . 'The following tests failed to properly run:' . PHP_EOL . PHP_EOL;
|
||||
foreach($this->failed_tests_to_run as &$run_request)
|
||||
{
|
||||
echo "\t- " . $run_request->test_profile->get_identifier() . ($run_request->get_arguments_description() != null ? ': ' . $run_request->get_arguments_description() : null) . PHP_EOL;
|
||||
echo ' - ' . $run_request->test_profile->get_identifier() . ($run_request->get_arguments_description() != null ? ': ' . $run_request->get_arguments_description() : null) . PHP_EOL;
|
||||
}
|
||||
echo PHP_EOL;
|
||||
}
|
||||
@@ -677,7 +679,7 @@ class pts_test_run_manager
|
||||
{
|
||||
$result = false;
|
||||
|
||||
if($this->result_file && $this->result_file->get_test_count() > 0)
|
||||
if($this->do_save_results() && $this->result_file->get_test_count() > 0)
|
||||
{
|
||||
$this->result_file->get_xml(PTS_SAVE_RESULTS_PATH . $this->get_file_name() . '/composite.xml');
|
||||
}
|
||||
@@ -703,7 +705,7 @@ class pts_test_run_manager
|
||||
return;
|
||||
}
|
||||
|
||||
if($this->result_file instanceof pts_result_file && $this->result_file->has_matching_test_and_run_identifier($test_run_request, $this->get_results_identifier()))
|
||||
if($this->result_file->has_matching_test_and_run_identifier($test_run_request, $this->get_results_identifier()))
|
||||
{
|
||||
// There already is a match for this test in this particular result buffer
|
||||
return true;
|
||||
@@ -833,7 +835,7 @@ class pts_test_run_manager
|
||||
}
|
||||
else if(count($to_run) == 0)
|
||||
{
|
||||
trigger_error('You must enter at least one test, suite, or result identifier to run.', E_USER_ERROR);
|
||||
//trigger_error('You must enter at least one test, suite, or result identifier to run.', E_USER_ERROR);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -841,23 +843,23 @@ class pts_test_run_manager
|
||||
}
|
||||
public function pre_execution_process()
|
||||
{
|
||||
if($this->is_new_result_file || $this->result_already_contains_identifier() == false)
|
||||
{
|
||||
$this->result_file->set_title($this->file_name_title);
|
||||
$this->result_file->set_description($this->run_description);
|
||||
$this->result_file->set_notes($this->get_notes());
|
||||
$this->result_file->set_internal_tags($this->get_internal_tags());
|
||||
$this->result_file->set_reference_id($this->get_reference_id());
|
||||
$this->result_file->set_preset_environment_variables($this->get_preset_environment_variables());
|
||||
|
||||
// TODO XXX JSON In null and notes
|
||||
$json_attr = $this->generate_json_system_attributes();
|
||||
$sys = new pts_result_file_system($this->results_identifier, phodevi::system_hardware(true), phodevi::system_software(true), $json_attr, pts_client::current_user(), null, date('Y-m-d H:i:s'), PTS_VERSION);
|
||||
$this->result_file->add_system($sys);
|
||||
}
|
||||
|
||||
if($this->do_save_results())
|
||||
{
|
||||
if($this->is_new_result_file || $this->result_already_contains_identifier() == false)
|
||||
{
|
||||
$this->result_file->set_title($this->file_name_title);
|
||||
$this->result_file->set_description($this->run_description);
|
||||
$this->result_file->set_notes($this->get_notes());
|
||||
$this->result_file->set_internal_tags($this->get_internal_tags());
|
||||
$this->result_file->set_reference_id($this->get_reference_id());
|
||||
$this->result_file->set_preset_environment_variables($this->get_preset_environment_variables());
|
||||
|
||||
// TODO XXX JSON In null and notes
|
||||
$json_attr = $this->generate_json_system_attributes();
|
||||
$sys = new pts_result_file_system($this->results_identifier, phodevi::system_hardware(true), phodevi::system_software(true), $json_attr, pts_client::current_user(), null, date('Y-m-d H:i:s'), PTS_VERSION);
|
||||
$this->result_file->add_system($sys);
|
||||
}
|
||||
|
||||
pts_client::setup_test_result_directory($this->get_file_name());
|
||||
}
|
||||
}
|
||||
@@ -1001,6 +1003,7 @@ class pts_test_run_manager
|
||||
$this->benchmark_log->log('Test Run Process Ended');
|
||||
if($this->do_save_results() && !$this->skip_post_execution_options)
|
||||
{
|
||||
// Save the results
|
||||
if($this->result_file->get_test_count() == 0 && $this->is_new_result_file)
|
||||
{
|
||||
pts_file_io::delete(PTS_SAVE_RESULTS_PATH . $this->get_file_name());
|
||||
@@ -1009,15 +1012,38 @@ class pts_test_run_manager
|
||||
|
||||
pts_file_io::delete(PTS_SAVE_RESULTS_PATH . $this->get_file_name() . '/test-logs/active/', null, true);
|
||||
|
||||
if($this->is_new_result_file || $this->result_already_contains_identifier() == false)
|
||||
{
|
||||
// nothing to do here now
|
||||
}
|
||||
|
||||
echo PHP_EOL;
|
||||
pts_module_manager::module_process('__event_results_process', $this);
|
||||
pts_client::save_test_result($this->get_file_name() . '/composite.xml', $this->result_file->get_xml(), true, $this->results_identifier);
|
||||
pts_module_manager::module_process('__event_results_saved', $this);
|
||||
}
|
||||
if($this->result_file->get_test_count() > 3 && pts_config::read_bool_config('PhoronixTestSuite/Options/Testing/ShowPostRunStatistics', 'TRUE'))
|
||||
{
|
||||
// Show any post run statistics
|
||||
pts_module_manager::module_process('__event_post_run_stats', $this);
|
||||
if($this->result_file->get_system_count() == 2)
|
||||
{
|
||||
$highlights = pts_result_file_analyzer::display_results_baseline_two_way_compare($this->result_file, true, false, true, ' ');
|
||||
if($highlights)
|
||||
{
|
||||
echo ' ' . pts_client::cli_just_bold('Result Highlights') . PHP_EOL;
|
||||
echo $highlights . PHP_EOL;
|
||||
}
|
||||
}
|
||||
if($this->result_file->get_system_count() > 2)
|
||||
{
|
||||
// Display winners and losers
|
||||
echo pts_result_file_analyzer::display_results_wins_losses($this->result_file, $this->get_results_identifier(), ' ') . PHP_EOL;
|
||||
}
|
||||
if($this->result_file->get_system_count() > 1)
|
||||
{
|
||||
echo pts_result_file_analyzer::display_result_file_stats_pythagorean_means($this->result_file, $this->get_results_identifier());
|
||||
}
|
||||
}
|
||||
|
||||
if($this->do_save_results() && !$this->skip_post_execution_options)
|
||||
{
|
||||
// See if the results should be displayed
|
||||
//echo PHP_EOL . 'Results Saved To: ; . PTS_SAVE_RESULTS_PATH . $this->get_file_name() . ;/composite.xml' . PHP_EOL;
|
||||
|
||||
if(!$this->auto_mode)
|
||||
@@ -1162,6 +1188,7 @@ class pts_test_run_manager
|
||||
else if($test_profile->is_test_installed() == false)
|
||||
{
|
||||
$tests_missing[] = $test_profile;
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1194,6 +1221,7 @@ class pts_test_run_manager
|
||||
if($test_profile->is_test_installed() == false)
|
||||
{
|
||||
$tests_missing[] = $test_profile;
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1487,6 +1515,10 @@ class pts_test_run_manager
|
||||
{
|
||||
list($test_arguments, $test_arguments_description) = pts_test_run_options::batch_user_options($test_profile);
|
||||
}
|
||||
else if($this->batch_mode && (pts_client::read_env('PRESET_OPTIONS') || pts_client::read_env('PRESET_OPTIONS_VALUES')))
|
||||
{
|
||||
list($test_arguments, $test_arguments_description) = pts_test_run_options::prompt_user_options($test_profile, null, true);
|
||||
}
|
||||
else if($this->auto_mode == 2)
|
||||
{
|
||||
list($test_arguments, $test_arguments_description) = pts_test_run_options::default_user_options($test_profile);
|
||||
@@ -1700,20 +1732,30 @@ class pts_test_run_manager
|
||||
{
|
||||
$valid_test_profile = false;
|
||||
}
|
||||
else if($test_type == 'Graphics' && !phodevi::is_display_server_active())
|
||||
else if($test_profile->is_display_required() && !phodevi::is_display_server_active())
|
||||
{
|
||||
$report_errors && pts_client::$display->test_run_error('No display server was found, cannot run ' . $test_profile);
|
||||
$report_errors && pts_client::$display->test_run_error('No display server was found, skipping ' . $test_profile);
|
||||
$valid_test_profile = false;
|
||||
}
|
||||
else if($test_profile->is_network_required() && !pts_network::network_support_available())
|
||||
{
|
||||
$report_errors && pts_client::$display->test_run_error('No network connection was found or is disabled, skipping ' . $test_profile);
|
||||
$valid_test_profile = false;
|
||||
}
|
||||
else if($test_profile->is_internet_required() && !pts_network::internet_support_available())
|
||||
{
|
||||
$report_errors && pts_client::$display->test_run_error('No Internet connection was found or is disabled, skipping ' . $test_profile);
|
||||
$valid_test_profile = false;
|
||||
}
|
||||
else if($test_type == 'Graphics' && in_array($display_driver, array('vesa', 'nv', 'cirrus')) && stripos($gpu, 'LLVM') === false)
|
||||
{
|
||||
// These display drivers end up being in known configurations without 3D hardware support so unless an LLVM-based string is reported as the GPU, don't advertise 3D tests
|
||||
$report_errors && pts_client::$display->test_run_error('3D acceleration support not available, cannot run ' . $test_profile);
|
||||
$report_errors && pts_client::$display->test_run_error('3D acceleration support not available, skipping ' . $test_profile);
|
||||
$valid_test_profile = false;
|
||||
}
|
||||
else if($test_type == 'Disk' && stripos(phodevi::read_property('system', 'filesystem'), 'SquashFS') !== false)
|
||||
{
|
||||
$report_errors && pts_client::$display->test_run_error('Running on a RAM-based live file-system, cannot run ' . $test_profile);
|
||||
$report_errors && pts_client::$display->test_run_error('Running on a RAM-based live file-system, skipping ' . $test_profile);
|
||||
$valid_test_profile = false;
|
||||
}
|
||||
else if(pts_client::read_env('NO_' . strtoupper($test_type) . '_TESTS') ||($skip_tests && (in_array($test_profile, $skip_tests) || in_array($test_type, $skip_tests) || in_array($test_profile->get_identifier(false), $skip_tests) || in_array($test_profile->get_identifier_base_name(), $skip_tests))))
|
||||
@@ -1728,13 +1770,13 @@ class pts_test_run_manager
|
||||
}
|
||||
else if($test_profile->is_root_required() && $is_batch_mode && phodevi::is_root() == false)
|
||||
{
|
||||
$report_errors && pts_client::$display->test_run_error('Cannot run ' . $test_profile . ' in batch mode as root access is required.');
|
||||
$report_errors && pts_client::$display->test_run_error('Running in batch mode as a user but this test requires root access, skipping ' . $test_profile);
|
||||
$valid_test_profile = false;
|
||||
}
|
||||
|
||||
if($valid_test_profile == false && pts_client::read_env('SKIP_ALL_TEST_SUPPORT_CHECKS'))
|
||||
{
|
||||
$report_errors && pts_client::$display->test_run_error('SKIP_ALL_TEST_SUPPORT_CHECKS is set for ' . $test_profile . '.');
|
||||
$report_errors && pts_client::$display->test_run_error('SKIP_ALL_TEST_SUPPORT_CHECKS is set for ' . $test_profile);
|
||||
$valid_test_profile = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -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 - 2019, Phoronix Media
|
||||
Copyright (C) 2008 - 2019, 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
|
||||
@@ -87,7 +87,7 @@ class pts_tests
|
||||
{
|
||||
$error = null;
|
||||
|
||||
foreach(array('fatal error', 'error:', 'error while loading', 'undefined reference', 'returned 1 exit status', 'not found', 'child process excited with status', 'error opening archive', 'failed to load', 'fatal', 'illegal argument') as $error_string)
|
||||
foreach(array('fatal error', 'error:', 'error while loading', 'undefined reference', ': cannot find -l', 'returned 1 exit status', 'not found', 'child process excited with status', 'error opening archive', 'failed to load', 'fatal', 'illegal argument') as $error_string)
|
||||
{
|
||||
if(($e = strripos($log_file, $error_string)) !== false)
|
||||
{
|
||||
@@ -106,6 +106,7 @@ class pts_tests
|
||||
if(isset($log_file[8]) && !isset($log_file[144]) && strpos($log_file, PHP_EOL) === false)
|
||||
{
|
||||
$error = $log_file;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -192,7 +193,7 @@ class pts_tests
|
||||
|
||||
if(is_dir($this_test_profile->get_install_dir()))
|
||||
{
|
||||
$extra_vars['PATH'] = $this_test_profile->get_install_dir() . ':' . $extra_vars['PATH'];
|
||||
$extra_vars['PATH'] = $this_test_profile->get_install_dir() . pts_client::get_path_separator() . $extra_vars['PATH'];
|
||||
$extra_vars['TEST_' . strtoupper(str_replace('-', '_', $this_test_profile->get_identifier_base_name()))] = $this_test_profile->get_install_dir();
|
||||
}
|
||||
}
|
||||
@@ -206,7 +207,7 @@ class pts_tests
|
||||
if(isset($extra_vars_append['PATH']))
|
||||
{
|
||||
// Special case variable where you likely want the two merged rather than overwriting
|
||||
$extra_vars['PATH'] = $extra_vars_append['PATH'] . (substr($extra_vars_append['PATH'], -1) != ':' ? ':' : null) . $extra_vars['PATH'];
|
||||
$extra_vars['PATH'] = $extra_vars_append['PATH'] . (substr($extra_vars_append['PATH'], -1) != pts_client::get_path_separator() ? pts_client::get_path_separator() : null) . $extra_vars['PATH'];
|
||||
unset($extra_vars_append['PATH']);
|
||||
}
|
||||
|
||||
@@ -273,7 +274,7 @@ class pts_tests
|
||||
$host_env = $_SERVER;
|
||||
unset($host_env['argv']);
|
||||
$descriptorspec = array(0 => array('pipe', 'r'), 1 => array('pipe', 'w'), 2 => array('pipe', 'w'));
|
||||
$test_process = proc_open($sh . ' ' . $run_file . ' ' . $pass_argument . (phodevi::is_windows() && false ? '' : ' 2>&1'), $descriptorspec, $pipes, $test_directory, array_merge($host_env, pts_client::environmental_variables(), $extra_vars));
|
||||
$test_process = proc_open($sh . ' "' . $run_file . '" ' . $pass_argument . (phodevi::is_windows() && false ? '' : ' 2>&1'), $descriptorspec, $pipes, $test_directory, array_merge($host_env, pts_client::environmental_variables(), $extra_vars));
|
||||
|
||||
if(is_resource($test_process))
|
||||
{
|
||||
@@ -410,7 +411,6 @@ class pts_tests
|
||||
echo PHP_EOL;
|
||||
}
|
||||
}
|
||||
echo PHP_EOL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -506,7 +506,7 @@ class pts_tests
|
||||
echo ' phoronix-test-suite install <test-name>' . PHP_EOL . PHP_EOL;
|
||||
}
|
||||
}
|
||||
public static function recently_saved_results()
|
||||
public static function recently_saved_results($extra_space = null)
|
||||
{
|
||||
$recent_results = pts_tests::test_results_by_date();
|
||||
|
||||
@@ -521,8 +521,8 @@ class pts_tests
|
||||
$days = floor(($current_time - $m_time) / 86400);
|
||||
$recent_result = sprintf('%-' . $res_length . 'ls [%-ls]', $recent_result, ($days == 0 ? 'Today' : pts_strings::days_ago_format_string($days) . ' old'));
|
||||
}
|
||||
echo PHP_EOL . pts_client::cli_just_bold('Recently Saved Test Results:') . PHP_EOL;
|
||||
echo pts_user_io::display_text_list($recent_results, ' ') . PHP_EOL;
|
||||
echo PHP_EOL . $extra_space . pts_client::cli_just_bold('Recently Saved Test Results:') . PHP_EOL;
|
||||
echo pts_user_io::display_text_list($recent_results, $extra_space . ' ') . PHP_EOL;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -86,18 +86,24 @@ class phodevi_cpu extends phodevi_device_interface
|
||||
{
|
||||
$info = null;
|
||||
|
||||
if(getenv('PTS_NPROC') && is_numeric(getenv('PTS_NPROC')))
|
||||
if(($n = getenv('NUM_CPU_CORES')) && is_numeric($n) && $n > 0)
|
||||
{
|
||||
$info = getenv('PTS_NPROC');
|
||||
// NUM_CPU_CORES can be used for overriding the number of exposed cores/threads to tests, matches the name of the env var set by PTS to test scripts
|
||||
$info = $n;
|
||||
}
|
||||
else if(getenv('NUMBER_OF_PROCESSORS') && is_numeric(getenv('NUMBER_OF_PROCESSORS')))
|
||||
else if(($n = getenv('PTS_NPROC')) && is_numeric($n) && $n > 0)
|
||||
{
|
||||
// PTS_NPROC can be used for overriding the number of exposed cores/threads to tests
|
||||
$info = $n;
|
||||
}
|
||||
else if(($n = getenv('NUMBER_OF_PROCESSORS')) && is_numeric($n) && $n > 0)
|
||||
{
|
||||
// Should be used by Windows they have NUMBER_OF_PROCESSORS set and use this as an easy way to override CPUs exposed
|
||||
$info = getenv('NUMBER_OF_PROCESSORS');
|
||||
$info = $n;
|
||||
}
|
||||
else if(phodevi::is_linux())
|
||||
{
|
||||
if(is_file('/sys/devices/system/cpu/online'))
|
||||
if(is_file('/sys/devices/system/cpu/online') && stripos(phodevi::read_property('system', 'system-layer'), 'lxc') === false)
|
||||
{
|
||||
$present = pts_file_io::file_get_contents('/sys/devices/system/cpu/online');
|
||||
|
||||
@@ -142,7 +148,7 @@ class phodevi_cpu extends phodevi_device_interface
|
||||
|
||||
if($info == null && isset(phodevi::$vfs->cpuinfo))
|
||||
{
|
||||
$info = self::cpuinfo_core_count();
|
||||
$info = self::cpuinfo_thread_count();
|
||||
}
|
||||
|
||||
return (is_numeric($info) && $info > 0 ? $info : 1);
|
||||
@@ -154,11 +160,52 @@ class phodevi_cpu extends phodevi_device_interface
|
||||
if(phodevi::is_linux())
|
||||
{
|
||||
$physical_cores = phodevi_cpu::cpuinfo_core_count();
|
||||
|
||||
if(empty($physical_cores) || $physical_cores == phodevi::read_property('cpu', 'thread-count'))
|
||||
{
|
||||
// Needed for POWER9 at least
|
||||
if(isset(phodevi::$vfs->lscpu) && ($t = strpos(phodevi::$vfs->lscpu, 'Core(s) per socket:')))
|
||||
{
|
||||
$lscpu = substr(phodevi::$vfs->lscpu, $t + strlen('Core(s) per socket:') + 1);
|
||||
$lscpu = substr($lscpu, 0, strpos($lscpu, PHP_EOL));
|
||||
$cores_per_socket = trim($lscpu);
|
||||
|
||||
if($cores_per_socket > 1 && ($t = strpos(phodevi::$vfs->lscpu, 'Socket(s):')))
|
||||
{
|
||||
$lscpu = substr(phodevi::$vfs->lscpu, $t + strlen('Socket(s):') + 1);
|
||||
$lscpu = substr($lscpu, 0, strpos($lscpu, PHP_EOL));
|
||||
$sockets = trim($lscpu);
|
||||
if(is_numeric($sockets) && $sockets >= 1)
|
||||
{
|
||||
$physical_cores = $cores_per_socket * $sockets;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
else if(phodevi::is_bsd())
|
||||
{
|
||||
// hw.cpu_topology_core_ids works at least on DragonFly BSD
|
||||
$physical_cores = intval(phodevi_bsd_parser::read_sysctl(array('hw.cpu_topology_core_ids')));
|
||||
$ht_ids = intval(phodevi_bsd_parser::read_sysctl(array('hw.cpu_topology_ht_ids')));
|
||||
if($ht_ids == 2)
|
||||
{
|
||||
$info = intval(phodevi_bsd_parser::read_sysctl(array('hw.ncpu')));
|
||||
|
||||
if($info > 1)
|
||||
{
|
||||
$physical_cores = $info / 2;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$phys_ids = intval(phodevi_bsd_parser::read_sysctl(array('hw.cpu_topology_phys_ids')));
|
||||
$physical_cores = intval(phodevi_bsd_parser::read_sysctl(array('hw.cpu_topology_core_ids')));
|
||||
if($phys_ids > 0 && ($phys_ids * $physical_cores) <= phodevi::read_property('cpu', 'thread-count') && $physical_cores % 2 == 0)
|
||||
{
|
||||
$physical_cores = $phys_ids * $physical_cores;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(phodevi::is_macosx())
|
||||
{
|
||||
@@ -210,6 +257,16 @@ class phodevi_cpu extends phodevi_device_interface
|
||||
if(phodevi::is_linux())
|
||||
{
|
||||
$cache_size = self::cpuinfo_cache_size();
|
||||
if(empty($cache_size) && isset(phodevi::$vfs->lscpu) && ($t = strpos(phodevi::$vfs->lscpu, 'L3 cache:')))
|
||||
{
|
||||
$lscpu = substr(phodevi::$vfs->lscpu, $t + strlen('L3 cache:') + 1);
|
||||
$lscpu = substr($lscpu, 0, strpos($lscpu, PHP_EOL));
|
||||
$lscpu = trim($lscpu);
|
||||
if(substr($lscpu, -1) == 'K')
|
||||
{
|
||||
$cache_size = substr($lscpu, 0, -1);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(phodevi::is_macosx())
|
||||
{
|
||||
@@ -290,8 +347,10 @@ class phodevi_cpu extends phodevi_device_interface
|
||||
$info = null;
|
||||
}
|
||||
}
|
||||
if($info == null && isset(phodevi::$vfs->cpuinfo)) // fall back for those without cpufreq
|
||||
if($info == null && isset(phodevi::$vfs->cpuinfo) && phodevi::read_property('system', 'kernel-architecture') != 'x86_64') // fall back for those without cpufreq
|
||||
{
|
||||
// Don't use this code path for x86_64 since for those systems the /sys reporting should work
|
||||
// and when that isn't the case, CPUFreq not loaded and thus reported here is usually dynamic frequency
|
||||
$cpu_mhz = self::read_cpuinfo_line('cpu MHz');
|
||||
$info = $cpu_mhz / 1000;
|
||||
|
||||
@@ -486,7 +545,7 @@ class phodevi_cpu extends phodevi_device_interface
|
||||
if(phodevi::is_linux())
|
||||
{
|
||||
$implementer = phodevi_linux_parser::read_cpuinfo_single('CPU implementer');
|
||||
if($implementer == '0x41')
|
||||
if($implementer == '0x41' || $implementer == '0x50')
|
||||
{
|
||||
$architecture = phodevi_linux_parser::read_cpuinfo_single('CPU architecture');
|
||||
switch($architecture)
|
||||
@@ -496,7 +555,7 @@ class phodevi_cpu extends phodevi_device_interface
|
||||
break;
|
||||
case '8':
|
||||
case 'AArch64':
|
||||
$info = 'ARMVv8';
|
||||
$info = 'ARMv8';
|
||||
break;
|
||||
}
|
||||
$part = phodevi_linux_parser::read_cpuinfo_single('CPU part');
|
||||
@@ -550,7 +609,12 @@ class phodevi_cpu extends phodevi_device_interface
|
||||
}
|
||||
}
|
||||
|
||||
if(strpos(phodevi::$vfs->dmesg, 'thunderx') !== false)
|
||||
if(strpos(phodevi::$vfs->dmesg, 'Ampere eMAG') !== false)
|
||||
{
|
||||
// Haven't found a better way to detect Ampere eMAG as not exposed via cpuinfo, etc
|
||||
$info = 'Ampere eMAG ' . $info;
|
||||
}
|
||||
else if(strpos(phodevi::$vfs->dmesg, 'thunderx') !== false)
|
||||
{
|
||||
// Haven't found a better way to detect ThunderX as not exposed via cpuinfo, etc
|
||||
$info = 'Cavium ThunderX ' . $info;
|
||||
|
||||
@@ -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 - 2019, Phoronix Media
|
||||
Copyright (C) 2008 - 2019, Michael Larabel
|
||||
phodevi_disk.php: The PTS Device Interface object for the system disk(s)
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
@@ -139,30 +139,46 @@ class phodevi_disk extends phodevi_device_interface
|
||||
else if(phodevi::is_bsd())
|
||||
{
|
||||
$i = 0;
|
||||
// On some systems, the first drive seems to be at dev.ad.8 rather than starting at dev.ad.0
|
||||
do
|
||||
{
|
||||
$disk = phodevi_bsd_parser::read_sysctl('dev.ad.' . $i . '.%desc');
|
||||
|
||||
if($disk != false && strpos($disk, 'DVD') === false && strpos($disk, 'ATAPI') === false)
|
||||
if($disk != false && strpos($disk, 'DVD') === false && $disk != false && strpos($disk, ' Console') === false && strpos($disk, 'ATAPI') === false)
|
||||
{
|
||||
array_push($disks, $disk);
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
while(($disk != false || $i < 9) && $i < 128);
|
||||
while(($disk != false || $i < 9) && $i < 64);
|
||||
$i = 0;
|
||||
do
|
||||
{
|
||||
$disk = phodevi_bsd_parser::read_sysctl('dev.nvme.' . $i . '.%desc');
|
||||
|
||||
if($disk != false && strpos($disk, 'DVD') === false && strpos($disk, 'ATAPI') === false)
|
||||
if(pts_client::executable_in_path('nvmecontrol'))
|
||||
{
|
||||
$nvmecontrol = shell_exec('nvmecontrol devlist 2>&1');
|
||||
while(($p = strpos($nvmecontrol, ': ')) !== false)
|
||||
{
|
||||
array_push($disks, $disk);
|
||||
$nvmecontrol = substr($nvmecontrol, $p + 2);
|
||||
$line = substr($nvmecontrol, 0, strpos($nvmecontrol, PHP_EOL));
|
||||
array_push($disks, trim($line));
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
while(($disk != false || $i < 9) && $i < 128);
|
||||
// On some systems, the first drive seems to be at dev.ad.8 rather than starting at dev.ad.0
|
||||
|
||||
if(empty($disks))
|
||||
{
|
||||
// This means of NVMe device reporting tends to just yield "Generic NVMe Device" string
|
||||
do
|
||||
{
|
||||
$disk = phodevi_bsd_parser::read_sysctl('dev.nvme.' . $i . '.%desc');
|
||||
|
||||
if($disk != false && strpos($disk, 'DVD') === false && $disk != false && strpos($disk, ' Console') === false && strpos($disk, 'ATAPI') === false)
|
||||
{
|
||||
array_push($disks, $disk);
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
while(($disk != false || $i < 9) && $i < 64);
|
||||
}
|
||||
|
||||
if(empty($disks) && pts_client::executable_in_path('camcontrol'))
|
||||
{
|
||||
@@ -170,7 +186,7 @@ class phodevi_disk extends phodevi_device_interface
|
||||
|
||||
foreach(explode(PHP_EOL, $camcontrol) as $line)
|
||||
{
|
||||
if(substr($line, 0, 1) == '<' && ($model_end = strpos($line, '>')) !== false && strpos($line, 'DVD') === false && strpos($line, 'ATAPI') === false)
|
||||
if(substr($line, 0, 1) == '<' && ($model_end = strpos($line, '>')) !== false && strpos($line, 'DVD') === false && strpos($line, 'ATAPI') === false && strpos($line, ' Console') === false)
|
||||
{
|
||||
$disk = self::prepend_disk_vendor(substr($line, 1, ($model_end - 1)));
|
||||
$disk = trim(str_replace(array('SATA'), null, $disk));
|
||||
@@ -203,10 +219,9 @@ class phodevi_disk extends phodevi_device_interface
|
||||
}
|
||||
else if(phodevi::is_linux())
|
||||
{
|
||||
$disks_formatted = array();
|
||||
$disks = array();
|
||||
|
||||
foreach(array_merge(pts_file_io::glob('/sys/block/sd*'), pts_file_io::glob('/sys/block/mmcblk*'), pts_file_io::glob('/sys/block/nvme*'), pts_file_io::glob('/sys/block/vd*')) as $sdx)
|
||||
foreach(array_merge(pts_file_io::glob('/sys/block/nvme*'), pts_file_io::glob('/sys/block/sd*'), pts_file_io::glob('/sys/block/mmcblk*'), pts_file_io::glob('/sys/block/vd*')) as $sdx)
|
||||
{
|
||||
if(strpos($sdx, 'boot') !== false)
|
||||
{
|
||||
@@ -238,30 +253,10 @@ class phodevi_disk extends phodevi_device_interface
|
||||
|
||||
if($disk_size > 0)
|
||||
{
|
||||
array_push($disks_formatted, $disk_model);
|
||||
array_push($disks, $disk_model);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for($i = 0; $i < count($disks_formatted); $i++)
|
||||
{
|
||||
if(!empty($disks_formatted[$i]))
|
||||
{
|
||||
$times_found = 1;
|
||||
|
||||
for($j = ($i + 1); $j < count($disks_formatted); $j++)
|
||||
{
|
||||
if($disks_formatted[$i] == $disks_formatted[$j])
|
||||
{
|
||||
$times_found++;
|
||||
$disks_formatted[$j] = '';
|
||||
}
|
||||
}
|
||||
|
||||
$disk = ($times_found > 1 ? $times_found . ' x ' : null) . $disks_formatted[$i];
|
||||
array_push($disks, $disk);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(phodevi::is_windows())
|
||||
{
|
||||
@@ -296,7 +291,7 @@ class phodevi_disk extends phodevi_device_interface
|
||||
}
|
||||
else
|
||||
{
|
||||
$disks = implode(' + ', $disks);
|
||||
$disks = pts_arrays::array_to_cleansed_item_string($disks);
|
||||
}
|
||||
|
||||
return $disks;
|
||||
|
||||
@@ -148,77 +148,6 @@ class phodevi_gpu extends phodevi_device_interface
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if(phodevi::is_ati_graphics() && phodevi::is_linux())
|
||||
{
|
||||
$ati_fsaa = phodevi_linux_parser::read_amd_pcsdb('OpenGL,AntiAliasSamples');
|
||||
$ati_fsaa_filter = phodevi_linux_parser::read_amd_pcsdb('OpenGL,AAF');
|
||||
|
||||
if(!empty($ati_fsaa))
|
||||
{
|
||||
if($ati_fsaa_filter == '0x00000000')
|
||||
{
|
||||
// Filter: Box
|
||||
switch($ati_fsaa)
|
||||
{
|
||||
case '0x00000002':
|
||||
$aa_level = '2x Box';
|
||||
break;
|
||||
case '0x00000004':
|
||||
$aa_level = '4x Box';
|
||||
break;
|
||||
case '0x00000008':
|
||||
$aa_level = '8x Box';
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if($ati_fsaa_filter == '0x00000001')
|
||||
{
|
||||
// Filter: Narrow-tent
|
||||
switch($ati_fsaa)
|
||||
{
|
||||
case '0x00000002':
|
||||
$aa_level = '4x Narrow-tent';
|
||||
break;
|
||||
case '0x00000004':
|
||||
$aa_level = '8x Narrow-tent';
|
||||
break;
|
||||
case '0x00000008':
|
||||
$aa_level = '12x Narrow-tent';
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if($ati_fsaa_filter == '0x00000002')
|
||||
{
|
||||
// Filter: Wide-tent
|
||||
switch($ati_fsaa)
|
||||
{
|
||||
case '0x00000002':
|
||||
$aa_level = '6x Wide-tent';
|
||||
break;
|
||||
case '0x00000004':
|
||||
$aa_level = '8x Wide-tent';
|
||||
break;
|
||||
case '0x00000008':
|
||||
$aa_level = '16x Wide-tent';
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
else if($ati_fsaa_filter == '0x00000003')
|
||||
{
|
||||
// Filter: Edge-detect
|
||||
switch($ati_fsaa)
|
||||
{
|
||||
case '0x00000004':
|
||||
$aa_level = '12x Edge-detect';
|
||||
break;
|
||||
case '0x00000008':
|
||||
$aa_level = '24x Edge-detect';
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(phodevi::is_mesa_graphics())
|
||||
{
|
||||
$gallium_msaa = getenv('GALLIUM_MSAA');
|
||||
@@ -264,29 +193,6 @@ class phodevi_gpu extends phodevi_device_interface
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if(phodevi::is_ati_graphics() && phodevi::is_linux())
|
||||
{
|
||||
$ati_af = phodevi_linux_parser::read_amd_pcsdb('OpenGL,AnisoDegree');
|
||||
|
||||
if(!empty($ati_af))
|
||||
{
|
||||
switch($ati_af)
|
||||
{
|
||||
case '0x00000002':
|
||||
$af_level = '2x';
|
||||
break;
|
||||
case '0x00000004':
|
||||
$af_level = '4x';
|
||||
break;
|
||||
case '0x00000008':
|
||||
$af_level = '8x';
|
||||
break;
|
||||
case '0x00000010':
|
||||
$af_level = '16x';
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(getenv('__GL_LOG_MAX_ANISO'))
|
||||
{
|
||||
$max_aniso = getenv('__GL_LOG_MAX_ANISO');
|
||||
@@ -549,18 +455,13 @@ class phodevi_gpu extends phodevi_device_interface
|
||||
}
|
||||
}
|
||||
|
||||
if(count($available_modes) <= 2)
|
||||
if(true) // XXX can remove this if it turns out to be fine
|
||||
{
|
||||
// Fallback to providing stock modes
|
||||
$stock_modes = array(
|
||||
array(800, 600),
|
||||
array(1024, 768),
|
||||
array(1280, 800),
|
||||
array(1280, 1024),
|
||||
array(1400, 900),
|
||||
array(1400, 1050),
|
||||
array(1600, 900),
|
||||
array(1680, 1050),
|
||||
array(1600, 1200),
|
||||
array(1920, 1080),
|
||||
array(1920, 1200),
|
||||
@@ -854,15 +755,6 @@ class phodevi_gpu extends phodevi_device_interface
|
||||
$mem_freq = max($mem_freq, $clock_freqs_current[1]);
|
||||
}
|
||||
}
|
||||
else if(phodevi::is_ati_graphics() && phodevi::is_linux()) // ATI GPU
|
||||
{
|
||||
$od_clocks = phodevi_linux_parser::read_ati_overdrive('CurrentPeak');
|
||||
|
||||
if(is_array($od_clocks) && count($od_clocks) >= 2) // ATI OverDrive
|
||||
{
|
||||
list($core_freq, $mem_freq) = $od_clocks;
|
||||
}
|
||||
}
|
||||
else if(phodevi::is_linux()) // More liberally attempt open-source freq detection than phodevi::is_mesa_graphics()
|
||||
{
|
||||
if(is_file('/sys/class/drm/card0/device/performance_level'))
|
||||
@@ -1007,6 +899,37 @@ class phodevi_gpu extends phodevi_device_interface
|
||||
}
|
||||
}
|
||||
}
|
||||
if($core_freq == null && is_file('/sys/class/drm/card0/device/pp_dpm_sclk'))
|
||||
{
|
||||
$pp = trim(file_get_contents('/sys/class/drm/card0/device/pp_dpm_sclk'));
|
||||
$pp = explode("\n", $pp);
|
||||
$pp = array_pop($pp);
|
||||
if(($x = strpos($pp, ': ')) !== false)
|
||||
{
|
||||
$pp = substr($pp, $x + 2);
|
||||
}
|
||||
$pp = trim(str_replace(array('*', 'Mhz'), '', $pp));
|
||||
if(is_numeric($pp))
|
||||
{
|
||||
$core_freq = $pp;
|
||||
|
||||
if(is_file('/sys/class/drm/card0/device/pp_dpm_mclk'))
|
||||
{
|
||||
$pp = trim(file_get_contents('/sys/class/drm/card0/device/pp_dpm_mclk'));
|
||||
$pp = explode("\n", $pp);
|
||||
$pp = array_pop($pp);
|
||||
if(($x = strpos($pp, ': ')) !== false)
|
||||
{
|
||||
$pp = substr($pp, $x + 2);
|
||||
}
|
||||
$pp = trim(str_replace(array('*', 'Mhz'), '', $pp));
|
||||
if(is_numeric($pp))
|
||||
{
|
||||
$mem_freq = $pp;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if($core_freq == null && isset(phodevi::$vfs->dmesg) && strrpos(phodevi::$vfs->dmesg, ' sclk:'))
|
||||
{
|
||||
// Attempt to read the LAST power level reported to dmesg, this is the current way for Radeon DPM on Linux 3.11+
|
||||
@@ -1112,51 +1035,7 @@ class phodevi_gpu extends phodevi_device_interface
|
||||
$info = phodevi_parser::read_glx_renderer();
|
||||
$video_ram = phodevi::read_property('gpu', 'memory-capacity');
|
||||
|
||||
if(phodevi::is_ati_graphics() && phodevi::is_linux())
|
||||
{
|
||||
$crossfire_status = phodevi_linux_parser::read_amd_pcsdb('SYSTEM/Crossfire/chain/*,Enable');
|
||||
$crossfire_status = pts_arrays::to_array($crossfire_status);
|
||||
$crossfire_card_count = 0;
|
||||
|
||||
for($i = 0; $i < count($crossfire_status); $i++)
|
||||
{
|
||||
if($crossfire_status[$i] == '0x00000001')
|
||||
{
|
||||
$crossfire_card_count += 2; // For now assume each chain is 2 cards, but proper way would be NumSlaves + 1
|
||||
}
|
||||
}
|
||||
|
||||
$adapters = phodevi_linux_parser::read_amd_graphics_adapters();
|
||||
|
||||
if(count($adapters) > 0)
|
||||
{
|
||||
$video_ram = $video_ram > 64 ? ' ' . $video_ram . 'MB' : null; // assume more than 64MB of vRAM
|
||||
|
||||
if($crossfire_card_count > 1 && $crossfire_card_count <= count($adapters))
|
||||
{
|
||||
$unique_adapters = array_unique($adapters);
|
||||
|
||||
if(count($unique_adapters) == 1)
|
||||
{
|
||||
if(strpos($adapters[0], 'X2') > 0 && $crossfire_card_count > 1)
|
||||
{
|
||||
$crossfire_card_count -= 1;
|
||||
}
|
||||
|
||||
$info = $crossfire_card_count . ' x ' . $adapters[0] . $video_ram . ' CrossFire';
|
||||
}
|
||||
else
|
||||
{
|
||||
$info = implode(', ', $unique_adapters) . ' CrossFire';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$info = $adapters[0] . $video_ram;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(phodevi::is_macosx())
|
||||
if(phodevi::is_macosx())
|
||||
{
|
||||
$system_profiler_info = implode(' + ', phodevi_osx_parser::read_osx_system_profiler('SPDisplaysDataType', 'ChipsetModel', true));
|
||||
|
||||
@@ -1279,7 +1158,7 @@ class phodevi_gpu extends phodevi_device_interface
|
||||
$info = str_replace('(TM)', null, implode(' + ', $windows_gpu));
|
||||
}
|
||||
|
||||
if(empty($info) || strpos($info, 'Mesa ') !== false || strpos($info, 'Gallium ') !== false || strpos($info, ' (DRM') !== false)
|
||||
if(empty($info) || strpos($info, 'Mesa ') !== false || strpos($info, 'Gallium ') !== false || strpos($info, 'DRM ') !== false)
|
||||
{
|
||||
if(($x = strpos($info, ' on ')) !== false)
|
||||
{
|
||||
@@ -1459,7 +1338,7 @@ class phodevi_gpu extends phodevi_device_interface
|
||||
}
|
||||
}
|
||||
|
||||
if(stripos($info, 'NVIDIA') === false && (stripos($info, 'Quadro') !== false || stripos($info, 'GeForce') !== false))
|
||||
if(stripos($info, 'NVIDIA') === false && (stripos($info, 'Quadro') !== false || stripos($info, 'Titan ') !== false || stripos($info, ' Tesla') !== false || stripos($info, 'GeForce') !== false || substr($info, 0, 2) == 'NV'))
|
||||
{
|
||||
$info = 'NVIDIA' . ' ' . $info;
|
||||
}
|
||||
@@ -1479,7 +1358,18 @@ class phodevi_gpu extends phodevi_device_interface
|
||||
|
||||
if(!empty($info) && $video_ram > 64 && strpos($info, $video_ram) == false) // assume more than 64MB of vRAM
|
||||
{
|
||||
$info .= ' ' . $video_ram . 'MB';
|
||||
if($video_ram < 1024)
|
||||
{
|
||||
$info .= ' ' . $video_ram . 'MB';
|
||||
}
|
||||
else
|
||||
{
|
||||
$video_ram = round($video_ram / 1024) . 'GB';
|
||||
if(strpos($info, $video_ram) == false)
|
||||
{
|
||||
$info .= ' ' . $video_ram;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(empty($info) && is_dir('/sys/class/drm/card0/device/driver/pvrsrvkm'))
|
||||
|
||||
@@ -245,7 +245,7 @@ class phodevi_memory extends phodevi_device_interface
|
||||
}
|
||||
}
|
||||
|
||||
return trim($mem_string);
|
||||
return trim(str_replace('Unknown ', '', $mem_string));
|
||||
}
|
||||
public static function memory_capacity()
|
||||
{
|
||||
|
||||
@@ -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 - 2019, Phoronix Media
|
||||
Copyright (C) 2008 - 2019, Michael Larabel
|
||||
phodevi_monitor.php: The PTS Device Interface object for the display monitor
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
@@ -77,7 +77,7 @@ class phodevi_monitor extends phodevi_device_interface
|
||||
// but fglrx/catalyst as of late 2013 is in habit of reporting monitors twice
|
||||
$monitor = array_unique($monitor);
|
||||
|
||||
$monitor = implode(' + ', $monitor);
|
||||
$monitor = pts_arrays::array_to_cleansed_item_string($monitor);
|
||||
}
|
||||
else if(isset(phodevi::$vfs->xorg_log))
|
||||
{
|
||||
@@ -100,7 +100,7 @@ class phodevi_monitor extends phodevi_device_interface
|
||||
// but fglrx/catalyst as of late 2013 is in habit of reporting monitors twice
|
||||
$monitor = array_unique($monitor);
|
||||
|
||||
$monitor = implode(' + ', $monitor);
|
||||
$monitor = pts_arrays::array_to_cleansed_item_string($monitor);
|
||||
}
|
||||
|
||||
if($monitor == null && phodevi::is_linux())
|
||||
@@ -201,19 +201,6 @@ class phodevi_monitor extends phodevi_device_interface
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if(phodevi::is_ati_graphics() && phodevi::is_linux())
|
||||
{
|
||||
$amdpcsdb_enabled_monitors = phodevi_linux_parser::read_amd_pcsdb('SYSTEM/BUSID-*/DDX,EnableMonitor');
|
||||
$amdpcsdb_enabled_monitors = pts_arrays::to_array($amdpcsdb_enabled_monitors);
|
||||
|
||||
foreach($amdpcsdb_enabled_monitors as $enabled_monitor)
|
||||
{
|
||||
foreach(pts_strings::comma_explode($enabled_monitor) as $monitor_connection)
|
||||
{
|
||||
$monitor_count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$monitor_count = 1;
|
||||
@@ -251,35 +238,6 @@ class phodevi_monitor extends phodevi_device_interface
|
||||
array_push($monitor_layout, ($hit_0_0 ? 'LOWER' : 'UPPER'));
|
||||
}
|
||||
}
|
||||
|
||||
if(count($monitor_layout) == 1)
|
||||
{
|
||||
// Something went wrong with xdpy information, go to fallback support
|
||||
if(phodevi::is_ati_graphics() && phodevi::is_linux())
|
||||
{
|
||||
$amdpcsdb_monitor_layout = phodevi_linux_parser::read_amd_pcsdb('SYSTEM/BUSID-*/DDX,DesktopSetup');
|
||||
$amdpcsdb_monitor_layout = pts_arrays::to_array($amdpcsdb_monitor_layout);
|
||||
|
||||
foreach($amdpcsdb_monitor_layout as $card_monitor_configuration)
|
||||
{
|
||||
switch($card_monitor_configuration)
|
||||
{
|
||||
case 'horizontal':
|
||||
array_push($monitor_layout, 'RIGHT');
|
||||
break;
|
||||
case 'horizontal,reverse':
|
||||
array_push($monitor_layout, 'LEFT');
|
||||
break;
|
||||
case 'vertical':
|
||||
array_push($monitor_layout, 'ABOVE');
|
||||
break;
|
||||
case 'vertical,reverse':
|
||||
array_push($monitor_layout, 'BELOW');
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return implode(',', $monitor_layout);
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2016 - 2018, Phoronix Media
|
||||
Copyright (C) 2016 - 2018, Michael Larabel
|
||||
Copyright (C) 2016 - 2019, Phoronix Media
|
||||
Copyright (C) 2016 - 2019, Michael Larabel
|
||||
phodevi_network.php: The PTS Device Interface object for network devices
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
@@ -63,18 +63,15 @@ class phodevi_network extends phodevi_device_interface
|
||||
}
|
||||
else if(phodevi::is_linux())
|
||||
{
|
||||
foreach(array('Ethernet controller', 'Network controller') as $controller)
|
||||
{
|
||||
$pci = phodevi_linux_parser::read_pci($controller);
|
||||
$pci = phodevi_linux_parser::read_pci_multi(array('Ethernet controller', 'Network controller'));
|
||||
|
||||
if(!empty($pci))
|
||||
{
|
||||
array_push($network, $pci);
|
||||
}
|
||||
if(!empty($pci))
|
||||
{
|
||||
$network = $pci;
|
||||
}
|
||||
}
|
||||
|
||||
return implode(' + ', $network);
|
||||
return pts_arrays::array_to_cleansed_item_string($network);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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 - 2019, Phoronix Media
|
||||
Copyright (C) 2008 - 2019, Michael Larabel
|
||||
phodevi_system.php: The PTS Device Interface object for the system software
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
@@ -91,6 +91,15 @@ class phodevi_system extends phodevi_device_interface
|
||||
$layer = phodevi::read_property('system', 'virtualized-mode');
|
||||
}
|
||||
|
||||
if(empty($layer) && is_file('/proc/version'))
|
||||
{
|
||||
if(stripos(file_get_contents('/proc/version'), 'Microsoft') !== false && stripos(file_get_contents('/proc/mounts'), 'lxfs') !== false)
|
||||
{
|
||||
// Microsoft Windows Subsystem for Linux
|
||||
$layer = 'WSL';
|
||||
}
|
||||
}
|
||||
|
||||
return $layer;
|
||||
}
|
||||
public static function sw_hostname()
|
||||
@@ -344,7 +353,7 @@ class phodevi_system extends phodevi_device_interface
|
||||
{
|
||||
// TODO could use better detection to verify if C: or the desired disk under test... but most of the time will be NTFS anyways
|
||||
$fs = trim(shell_exec('powershell "(Get-Volume)[1].FileSystemType"'));
|
||||
if(empty($fs) || $fs == 'Unknown')
|
||||
if(empty($fs) || $fs == 'Unknown' || $fs == 'FAT32')
|
||||
{
|
||||
$fs = trim(shell_exec('powershell "(Get-Volume)[0].FileSystemType"'));
|
||||
}
|
||||
@@ -485,9 +494,16 @@ class phodevi_system extends phodevi_device_interface
|
||||
}
|
||||
}
|
||||
|
||||
if(empty($virtualized) && is_file('/.dockerenv'))
|
||||
if(empty($virtualized))
|
||||
{
|
||||
$virtualized = 'Docker';
|
||||
if(is_file('/.dockerenv'))
|
||||
{
|
||||
$virtualized = 'Docker';
|
||||
}
|
||||
else if(is_file('/dev/lxc/console'))
|
||||
{
|
||||
$virtualized = 'lxc';
|
||||
}
|
||||
}
|
||||
|
||||
return $virtualized;
|
||||
@@ -578,7 +594,7 @@ class phodevi_system extends phodevi_device_interface
|
||||
}
|
||||
|
||||
// DragonFlyBSD
|
||||
if(($spectre = phodevi_bsd_parser::read_sysctl('machdep.spectre_mitigation')) != '0' && !empty($spectre))
|
||||
if(($spectre = phodevi_bsd_parser::read_sysctl('machdep.spectre_mitigation')) != '0' && $spectre != 'NONE' && !empty($spectre))
|
||||
{
|
||||
$security[] = 'Spectre ' . $spectre . ' Mitigation';
|
||||
}
|
||||
@@ -588,7 +604,7 @@ class phodevi_system extends phodevi_device_interface
|
||||
}
|
||||
}
|
||||
|
||||
return !empty($security) ? implode(' + ', $security) . ' Protection' : null;
|
||||
return !empty($security) ? implode(' + ', $security) : null;
|
||||
}
|
||||
public static function sw_compiler()
|
||||
{
|
||||
@@ -1180,7 +1196,7 @@ class phodevi_system extends phodevi_device_interface
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(stripos($vendor, $version) === false)
|
||||
else if($version != null && stripos($vendor, $version) === false)
|
||||
{
|
||||
$os = $vendor . ' ' . $version;
|
||||
}
|
||||
@@ -1337,7 +1353,10 @@ class phodevi_system extends phodevi_device_interface
|
||||
//$version = substr($lx_output, strpos($lx_output, ' ') + 1);
|
||||
|
||||
$desktop_environment = 'LXQt';
|
||||
//$desktop_version = $version;
|
||||
if(pts_client::executable_in_path('lxqt-about'))
|
||||
{
|
||||
$desktop_version = pts_strings::last_in_string(trim(shell_exec('lxqt-about --version | grep liblxqt 2> /dev/null')));
|
||||
}
|
||||
}
|
||||
else if(pts_client::is_process_running('lxsession') || $desktop_session == 'lxde')
|
||||
{
|
||||
@@ -1476,21 +1495,23 @@ class phodevi_system extends phodevi_device_interface
|
||||
|
||||
if($pos === false || getenv('DISPLAY') == false)
|
||||
{
|
||||
$info = null;
|
||||
$version = null;
|
||||
}
|
||||
else if(($pos = strrpos($info, '(')) === false)
|
||||
else if(($pos = strrpos($info, '(')) === false && strrpos($info, 'Server') === false)
|
||||
{
|
||||
$info = trim(substr($info, strrpos($info, ' ')));
|
||||
$version = trim(substr($info, strrpos($info, ' ')));
|
||||
}
|
||||
else
|
||||
{
|
||||
$info = trim(substr($info, strrpos($info, 'Server') + 6));
|
||||
$version = trim(substr($info, strrpos($info, 'Server') + 6));
|
||||
|
||||
if(!pts_strings::is_version($version))
|
||||
{
|
||||
$version = null;
|
||||
}
|
||||
}
|
||||
|
||||
if($info != null)
|
||||
{
|
||||
array_push($display_servers, 'X Server ' . $info);
|
||||
}
|
||||
array_push($display_servers, trim('X Server ' . $version));
|
||||
}
|
||||
if(pts_client::is_process_running('surfaceflinger'))
|
||||
{
|
||||
@@ -1536,11 +1557,7 @@ class phodevi_system extends phodevi_device_interface
|
||||
|
||||
if(empty($display_driver))
|
||||
{
|
||||
if(phodevi::is_ati_graphics() && phodevi::is_linux())
|
||||
{
|
||||
$display_driver = 'fglrx';
|
||||
}
|
||||
else if(phodevi::is_nvidia_graphics() || is_file('/proc/driver/nvidia/version'))
|
||||
if(phodevi::is_nvidia_graphics() || is_file('/proc/driver/nvidia/version'))
|
||||
{
|
||||
$display_driver = 'nvidia';
|
||||
}
|
||||
@@ -1668,18 +1685,6 @@ class phodevi_system extends phodevi_device_interface
|
||||
if(!empty($driver_version) && $with_version && $driver_version != '0.0.0')
|
||||
{
|
||||
$display_driver .= ' ' . $driver_version;
|
||||
|
||||
// XXX: The below check is disabled since the Catalyst Version no longer seems reliably reported (circa Catalyst 13.x)
|
||||
if(false && phodevi::is_ati_graphics() && strpos($display_driver, 'fglrx') !== false)
|
||||
{
|
||||
$catalyst_version = phodevi_linux_parser::read_amd_pcsdb('AMDPCSROOT/SYSTEM/LDC,Catalyst_Version');
|
||||
|
||||
if($catalyst_version != null && $catalyst_version > 10.1 && $catalyst_version != 10.5 && $catalyst_version != 11.8)
|
||||
{
|
||||
// This option was introduced around Catalyst 10.5 but seems to not be updated properly until Catalyst 10.11/10.12
|
||||
$display_driver .= ' Catalyst ' . $catalyst_version . '';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1739,6 +1744,16 @@ class phodevi_system extends phodevi_device_interface
|
||||
$info = substr(phodevi::$vfs->vulkaninfo, $pos + 20);
|
||||
$info = trim(substr($info, 0, strpos($info, "\n")));
|
||||
}
|
||||
else if(($pos = strpos(phodevi::$vfs->vulkaninfo, 'apiVersion')) !== false)
|
||||
{
|
||||
$apiv = substr(phodevi::$vfs->vulkaninfo, $pos);
|
||||
$apiv = trim(substr($apiv, 0, strpos($apiv, ")\n")));
|
||||
$apiv = trim(substr($apiv, strpos($apiv, '(') + 1));
|
||||
if(pts_strings::is_version($apiv))
|
||||
{
|
||||
$info = $apiv;
|
||||
}
|
||||
}
|
||||
}
|
||||
/*
|
||||
if($info == null)
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2008 - 2017, Phoronix Media
|
||||
Copyright (C) 2008 - 2017, Michael Larabel
|
||||
Copyright (C) 2008 - 2019, Phoronix Media
|
||||
Copyright (C) 2008 - 2019, Michael Larabel
|
||||
phodevi_linux_parser.php: General parsing functions specific to Linux
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
@@ -160,7 +160,7 @@ class phodevi_linux_parser
|
||||
|
||||
if((phodevi::is_root() || is_readable('/dev/mem')) && pts_client::executable_in_path('dmidecode'))
|
||||
{
|
||||
$ignore = pts_arrays::to_array($ignore);
|
||||
$ignore = array_map('strtolower', pts_arrays::to_array($ignore));
|
||||
|
||||
$dmidecode = shell_exec('dmidecode --type ' . $type . ' 2>&1');
|
||||
$sub_type = "\n" . $sub_type . "\n";
|
||||
@@ -181,7 +181,7 @@ class phodevi_linux_parser
|
||||
{
|
||||
$dmidecode_r = pts_strings::colon_explode($dmidecode_elements[$i]);
|
||||
|
||||
if($dmidecode_r[0] == $object && isset($dmidecode_r[1]) && !in_array($dmidecode_r[1], $ignore))
|
||||
if($dmidecode_r[0] == $object && isset($dmidecode_r[1]) && !in_array(strtolower($dmidecode_r[1]), $ignore))
|
||||
{
|
||||
array_push($value, $dmidecode_r[1]);
|
||||
$found_in_section = true;
|
||||
@@ -264,239 +264,6 @@ class phodevi_linux_parser
|
||||
|
||||
return $dmi;
|
||||
}
|
||||
public static function read_ati_overdrive($attribute, $adapter = 0)
|
||||
{
|
||||
// Read ATI OverDrive information
|
||||
// OverDrive supported in fglrx 8.52+ drivers
|
||||
$value = false;
|
||||
|
||||
if(($amdconfig = self::find_amdconfig()))
|
||||
{
|
||||
if($attribute == 'Temperature')
|
||||
{
|
||||
$info = shell_exec($amdconfig . ' --adapter=' . $adapter . ' --od-gettemperature 2>&1');
|
||||
|
||||
if(($start = strpos($info, 'Temperature -')) !== false)
|
||||
{
|
||||
$info = substr($info, $start + 14);
|
||||
$value = substr($info, 0, strpos($info, ' C'));
|
||||
}
|
||||
}
|
||||
else if($attribute == 'FanSpeed')
|
||||
{
|
||||
// Right now there is no standardized interface to get the fan speed through besides the pplib command
|
||||
$info = shell_exec($amdconfig . ' --adapter=' . $adapter . ' --pplib-cmd \'get fanspeed 0\' 2>&1');
|
||||
|
||||
if(($start = strpos($info, 'Fan Speed:')) !== false)
|
||||
{
|
||||
$info = substr($info, $start + 11);
|
||||
$info = substr($info, 0, strpos($info, '%'));
|
||||
|
||||
if(is_numeric($info))
|
||||
{
|
||||
$value = $info;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$info = shell_exec($amdconfig . ' --adapter=' . $adapter . ' --od-getclocks 2>&1');
|
||||
|
||||
if(strpos($info, 'GPU') !== false)
|
||||
{
|
||||
foreach(explode("\n", $info) as $line)
|
||||
{
|
||||
$line_r = pts_strings::colon_explode($line);
|
||||
|
||||
if(count($line_r) == 2)
|
||||
{
|
||||
$od_option = str_replace(' ', null, $line_r[0]);
|
||||
|
||||
if($od_option == $attribute)
|
||||
{
|
||||
$od_value = pts_strings::trim_spaces($line_r[1]);
|
||||
$od_value = str_replace(array('%'), null, $od_value);
|
||||
$od_value_r = explode(' ', $od_value);
|
||||
|
||||
$value = (count($od_value_r) == 1 ? $od_value_r[0] : $od_value_r);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $value;
|
||||
}
|
||||
public static function read_amd_pcsdb($attribute)
|
||||
{
|
||||
// Read AMD's AMDPCSDB, AMD Persistent Configuration Store Database
|
||||
static $try_aticonfig = true;
|
||||
static $is_first_read = true;
|
||||
$ati_info = null;
|
||||
|
||||
if($try_aticonfig)
|
||||
{
|
||||
if(($amdconfig = self::find_amdconfig()))
|
||||
{
|
||||
$info = shell_exec($amdconfig . ' --get-pcs-key=' . $attribute . ' 2>&1');
|
||||
|
||||
if($is_first_read && strpos($info, 'No supported adapters') != false)
|
||||
{
|
||||
$try_aticonfig = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(($pos = strpos($info, ':')) > 0 && strpos($info, 'Error') === false)
|
||||
{
|
||||
$ati_info = substr($info, $pos + 2);
|
||||
$ati_info = substr($ati_info, 0, strpos($ati_info, ' '));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$try_aticonfig = false;
|
||||
}
|
||||
|
||||
$is_first_read = false;
|
||||
}
|
||||
|
||||
if($ati_info == null && is_file('/etc/ati/amdpcsdb'))
|
||||
{
|
||||
// Using aticonfig --get-pcs-key failed, switch to the PTS direct parser of AMDPCSDB
|
||||
$ati_info = phodevi_linux_parser::read_amd_pcsdb_direct_parser($attribute);
|
||||
}
|
||||
|
||||
return $ati_info;
|
||||
}
|
||||
public static function read_amd_pcsdb_direct_parser($attribute, $find_once = false)
|
||||
{
|
||||
// Read AMD's AMDPCSDB, AMD Persistent Configuration Store Database but using our own internal parser instead of relying upon aticonfig/amdconfig
|
||||
$amdpcsdb_file = null;
|
||||
$last_found_section_count = -1;
|
||||
$this_section_count = 0;
|
||||
$attribute_values = array();
|
||||
$attribute = pts_strings::comma_explode($attribute);
|
||||
|
||||
if(count($attribute) == 2)
|
||||
{
|
||||
$attribute_prefix = array_reverse(explode('/', $attribute[0]));
|
||||
$attribute_key = $attribute[1];
|
||||
$is_in_prefix = false;
|
||||
|
||||
if(is_file('/etc/ati/amdpcsdb'))
|
||||
{
|
||||
$amdpcsdb_file = explode("\n", file_get_contents('/etc/ati/amdpcsdb'));
|
||||
}
|
||||
|
||||
for($l = 0; $l < count($amdpcsdb_file) && ($find_once == false || $last_found_section_count == -1); $l++)
|
||||
{
|
||||
$line = trim($amdpcsdb_file[$l]);
|
||||
|
||||
if(substr($line, 0, 1) == '[' && substr($line, -1) == ']')
|
||||
{
|
||||
// AMDPCSDB Header
|
||||
$prefix_matches = true;
|
||||
$header = array_reverse(explode('/', substr($line, 1, -1)));
|
||||
|
||||
for($i = 0; $i < count($attribute_prefix) && $i < count($header) && $prefix_matches; $i++)
|
||||
{
|
||||
if($attribute_prefix[$i] != $header[$i] && pts_strings::proximity_match($attribute_prefix[$i], $header[$i]) == false)
|
||||
{
|
||||
$prefix_matches = false;
|
||||
}
|
||||
}
|
||||
|
||||
if($prefix_matches)
|
||||
{
|
||||
$is_in_prefix = true;
|
||||
$this_section_count++;
|
||||
}
|
||||
else
|
||||
{
|
||||
$is_in_prefix = false;
|
||||
}
|
||||
}
|
||||
else if($is_in_prefix && $this_section_count != $last_found_section_count && count(($key_components = explode('=', $line))) == 2)
|
||||
{
|
||||
// AMDPCSDB Value
|
||||
if($key_components[0] == $attribute_key)
|
||||
{
|
||||
$value_type = substr($key_components[1], 0, 1);
|
||||
$value = substr($key_components[1], 1);
|
||||
|
||||
switch($value_type)
|
||||
{
|
||||
case 'V':
|
||||
// Value
|
||||
if(is_numeric($value) && strlen($value) < 9)
|
||||
{
|
||||
$value = dechex($value);
|
||||
$value = '0x' . str_repeat(0, 8 - strlen($value)) . strtoupper($value);
|
||||
}
|
||||
break;
|
||||
case 'R':
|
||||
// Raw
|
||||
break;
|
||||
case 'S':
|
||||
// String
|
||||
break;
|
||||
|
||||
}
|
||||
array_push($attribute_values, $value);
|
||||
$last_found_section_count = $this_section_count;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(count($attribute_values) == 0)
|
||||
{
|
||||
$attribute_values = null;
|
||||
}
|
||||
else if(count($attribute_values) == 1)
|
||||
{
|
||||
$attribute_values = $attribute_values[0];
|
||||
}
|
||||
|
||||
return $attribute_values;
|
||||
}
|
||||
public static function find_amdconfig()
|
||||
{
|
||||
$amdconfig = false;
|
||||
|
||||
if(($t = pts_client::executable_in_path('aticonfig')))
|
||||
{
|
||||
$amdconfig = $t;
|
||||
}
|
||||
else if(($t = pts_client::executable_in_path('amdconfig')))
|
||||
{
|
||||
$amdconfig = $t;
|
||||
}
|
||||
|
||||
return $amdconfig;
|
||||
}
|
||||
public static function read_amd_graphics_adapters()
|
||||
{
|
||||
// Read ATI/AMD graphics hardware using aticonfig
|
||||
$adapters = array();
|
||||
|
||||
if(($amdconfig = self::find_amdconfig()))
|
||||
{
|
||||
$info = trim(shell_exec($amdconfig . ' --list-adapters 2>&1'));
|
||||
|
||||
foreach(explode("\n", $info) as $line)
|
||||
{
|
||||
if(($last_point = strrpos($line, '.')) > 0)
|
||||
{
|
||||
array_push($adapters, substr($line, $last_point + 3));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $adapters;
|
||||
}
|
||||
public static function read_cpuinfo($attribute, $cpuinfo = false)
|
||||
{
|
||||
// Read CPU information
|
||||
@@ -705,7 +472,7 @@ class phodevi_linux_parser
|
||||
|
||||
if(($pos = strpos($pci_info, $desc[$i])) !== false)
|
||||
{
|
||||
$sub_pci_info = str_replace(array('[AMD]', '[AMD/ATI]'), null, substr($pci_info, $pos + strlen($desc[$i])));
|
||||
$sub_pci_info = str_replace(array('[AMD]', '[AMD/ATI]', ' Limited'), null, substr($pci_info, $pos + strlen($desc[$i])));
|
||||
$EOL = strpos($sub_pci_info, "\n");
|
||||
|
||||
if($clean_string)
|
||||
@@ -740,6 +507,76 @@ class phodevi_linux_parser
|
||||
|
||||
return $info;
|
||||
}
|
||||
public static function read_pci_multi($desc, $clean_string = true)
|
||||
{
|
||||
// Read PCI bus information
|
||||
static $pci_info = null;
|
||||
$info = array();
|
||||
$desc = pts_arrays::to_array($desc);
|
||||
|
||||
if($pci_info == null)
|
||||
{
|
||||
if(!is_executable('/usr/bin/lspci') && is_executable('/sbin/lspci'))
|
||||
{
|
||||
$lspci_cmd = '/sbin/lspci';
|
||||
}
|
||||
else if(($lspci = pts_client::executable_in_path('lspci')))
|
||||
{
|
||||
$lspci_cmd = $lspci;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
$pci_info = shell_exec($lspci_cmd . ' 2> /dev/null');
|
||||
}
|
||||
|
||||
for($i = 0; $i < count($desc); $i++)
|
||||
{
|
||||
if(substr($desc[$i], -1) != ':')
|
||||
{
|
||||
$desc[$i] .= ':';
|
||||
}
|
||||
$pos = 0;
|
||||
while(($pos = strpos($pci_info, $desc[$i], $pos)) !== false)
|
||||
{
|
||||
$pos += strlen($desc[$i]);
|
||||
$sub_pci_info = str_replace(array('[AMD]', '[AMD/ATI]', ' Limited', ' Connection', ' Gigabit', ' Wireless', '(1)', '(2)', '(3)', '(4)', '(5)', '(6)', '(7)', '(8)', '(9)'), null, substr($pci_info, $pos));
|
||||
$EOL = strpos($sub_pci_info, "\n");
|
||||
|
||||
if($clean_string)
|
||||
{
|
||||
if(($temp = strpos($sub_pci_info, '/')) < $EOL && $temp > 0)
|
||||
{
|
||||
if(($temp = strpos($sub_pci_info, ' ', ($temp + 2))) < $EOL && $temp > 0)
|
||||
{
|
||||
$EOL = $temp;
|
||||
}
|
||||
}
|
||||
|
||||
if(($temp = strpos($sub_pci_info, '(')) < $EOL && $temp > 0)
|
||||
{
|
||||
$EOL = $temp;
|
||||
}
|
||||
|
||||
if(($temp = strpos($sub_pci_info, '[')) < $EOL && $temp > 0)
|
||||
{
|
||||
$EOL = $temp;
|
||||
}
|
||||
}
|
||||
|
||||
$sub_pci_info = trim(substr($sub_pci_info, 0, $EOL));
|
||||
|
||||
if(($strlen = strlen($sub_pci_info)) >= 6 && $strlen < 128)
|
||||
{
|
||||
$info[] = pts_strings::strip_string($sub_pci_info);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $info;
|
||||
}
|
||||
public static function read_sensors($attributes)
|
||||
{
|
||||
// Read LM_Sensors
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2009 - 2018, Phoronix Media
|
||||
Copyright (C) 2009 - 2018, Michael Larabel
|
||||
Copyright (C) 2009 - 2019, Phoronix Media
|
||||
Copyright (C) 2009 - 2019, Michael Larabel
|
||||
phodevi.php: The object for interacting with the PTS device framework
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
@@ -229,7 +229,7 @@ class phodevi extends phodevi_base
|
||||
public static function sensor_object_identifier(&$sensor_object)
|
||||
{
|
||||
$sensor = array($sensor_object->get_type(), $sensor_object->get_sensor(), get_class($sensor_object));
|
||||
return self::sensor_identifier($sensor) . '.' . $sensor_object->get_instance();
|
||||
return self::sensor_identifier($sensor) . ($sensor_object->get_instance() != 0 ? '.' . $sensor_object->get_instance() : null);
|
||||
}
|
||||
public static function sensor_identifier($sensor)
|
||||
{
|
||||
@@ -370,23 +370,49 @@ class phodevi extends phodevi_base
|
||||
{
|
||||
if(!empty($value))
|
||||
{
|
||||
$tabled[] = array(pts_client::cli_just_bold($key) . ':' . str_repeat(' ', (16 - strlen($key))), $value);
|
||||
//$sys_string .= ' ' . strtoupper($key) . ':' . $value . PHP_EOL;
|
||||
if(isset($value[64]) && strpos($value, ' + ') !== false)
|
||||
{
|
||||
$values = explode(' + ', $value);
|
||||
$tabled[] = array(pts_client::cli_just_bold($key) . ':' . str_repeat(' ', (16 - strlen($key))), array_shift($values));
|
||||
foreach($values as $value)
|
||||
{
|
||||
$tabled[] = array(pts_client::cli_just_bold(' '), '+ ' . $value);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$tabled[] = array(pts_client::cli_just_bold($key) . ':' . str_repeat(' ', (16 - strlen($key))), $value);
|
||||
//$sys_string .= ' ' . strtoupper($key) . ':' . $value . PHP_EOL;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(true || !empty($in)) // TODO this check not needed anymore?
|
||||
{
|
||||
if(($x = strpos($in, ' (')))
|
||||
{
|
||||
$in = substr($in, 0, $x);
|
||||
}
|
||||
if(($x = strpos($in, ' (')))
|
||||
{
|
||||
$in = substr($in, 0, $x);
|
||||
}
|
||||
|
||||
if(!empty($tabled))
|
||||
{
|
||||
$sys_string .= pts_user_io::display_text_table($tabled, ' ', 0, 17) . PHP_EOL;
|
||||
}
|
||||
$sys_string .= PHP_EOL . ' ' . pts_client::cli_colored_text(strtoupper($key), 'gray', true) . ': ' . str_repeat(' ', (18 - strlen($key))) . pts_client::cli_colored_text($in, 'green', true) . PHP_EOL;
|
||||
|
||||
if(isset($in[80]) && strpos($in, ' + ') !== false)
|
||||
{
|
||||
$values = explode(' + ', $in);
|
||||
$sys_string .= PHP_EOL . ' ' . pts_client::cli_colored_text(strtoupper($key), 'gray', true) . ': ' . str_repeat(' ', (18 - strlen($key))) . pts_client::cli_colored_text(array_shift($values), 'green', true);
|
||||
foreach($values as $value)
|
||||
{
|
||||
$sys_string .= PHP_EOL . str_repeat(' ', 22) . pts_client::cli_colored_text('+ ' . $value, 'green', true);
|
||||
}
|
||||
$sys_string .= PHP_EOL;
|
||||
}
|
||||
else
|
||||
{
|
||||
$sys_string .= PHP_EOL . ' ' . pts_client::cli_colored_text(strtoupper($key), 'gray', true) . ': ' . str_repeat(' ', (18 - strlen($key))) . pts_client::cli_colored_text($in, 'green', true) . PHP_EOL;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -572,7 +598,7 @@ class phodevi extends phodevi_base
|
||||
}
|
||||
|
||||
// OpenGL / graphics detection
|
||||
$graphics_detection = array('NVIDIA', array('ATI', 'AMD', 'fglrx'), array('Mesa', 'SGI'));
|
||||
$graphics_detection = array('NVIDIA', array('Mesa', 'SGI'), array('AMD'));
|
||||
$opengl_driver = phodevi::read_property('system', 'opengl-vendor') . ' ' . phodevi::read_property('system', 'opengl-driver') . ' ' . phodevi::read_property('system', 'dri-display-driver');
|
||||
$opengl_driver = trim(str_replace('Corporation', null, $opengl_driver)); // Prevents a possible false positive for ATI being in CorporATIon
|
||||
|
||||
@@ -831,12 +857,6 @@ class phodevi extends phodevi_base
|
||||
self::detect_graphics();
|
||||
return self::$graphics['mesa'];
|
||||
}
|
||||
public static function is_ati_graphics()
|
||||
{
|
||||
// Detection for fglrx / old AMD blob driver, newer AMDGPU-PRO / AMDGPU should go to is_mesa_graphics
|
||||
self::detect_graphics();
|
||||
return self::$graphics['ati'] && pts_client::executable_in_path('amdcccle');;
|
||||
}
|
||||
public static function is_nvidia_graphics()
|
||||
{
|
||||
self::detect_graphics();
|
||||
@@ -844,7 +864,7 @@ class phodevi extends phodevi_base
|
||||
}
|
||||
public static function is_root()
|
||||
{
|
||||
return phodevi::read_property('system', 'username') == 'root';
|
||||
return phodevi::read_property('system', 'username') == 'root' || is_writable('/root');
|
||||
}
|
||||
public static function is_display_server_active()
|
||||
{
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2009 - 2017, Phoronix Media
|
||||
Copyright (C) 2009 - 2017, Michael Larabel
|
||||
Copyright (C) 2009 - 2019, Phoronix Media
|
||||
Copyright (C) 2009 - 2019, 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
|
||||
@@ -115,7 +115,7 @@ class cpu_power extends phodevi_sensor
|
||||
}
|
||||
}
|
||||
|
||||
return $cpu_power;
|
||||
return round($cpu_power, 2);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -38,9 +38,10 @@ class gpu_fanspeed extends phodevi_sensor
|
||||
// nvidia-settings --describe GPUFanTarget
|
||||
$fan_speed = phodevi_parser::read_nvidia_extension('[fan:0]/GPUCurrentFanSpeed');
|
||||
}
|
||||
else if(phodevi::is_ati_graphics() && phodevi::is_linux())
|
||||
else if($fan1_input = phodevi_linux_parser::read_sysfs_node('/sys/class/drm/card0/device/hwmon/hwmon*/fan1_input', 'POSITIVE_NUMERIC'))
|
||||
{
|
||||
$fan_speed = phodevi_linux_parser::read_ati_overdrive('FanSpeed');
|
||||
// AMDGPU path
|
||||
$fan_speed = round($fan1_input / phodevi_linux_parser::read_sysfs_node('/sys/class/drm/card0/device/hwmon/hwmon*/fan1_max', 'POSITIVE_NUMERIC') * 100, 2);
|
||||
}
|
||||
|
||||
return $fan_speed;
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2009 - 2015, Phoronix Media
|
||||
Copyright (C) 2009 - 2015, Michael Larabel
|
||||
Copyright (C) 2009 - 2018, Phoronix Media
|
||||
Copyright (C) 2009 - 2018, 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
|
||||
@@ -42,19 +42,39 @@ class gpu_freq extends phodevi_sensor
|
||||
$core_freq = isset($nv_freq[0]) ? $nv_freq[0] : 0;
|
||||
$mem_freq = isset($nv_freq[1]) ? $nv_freq[1] : 0;
|
||||
}
|
||||
else if(phodevi::is_ati_graphics() && phodevi::is_linux()) // ATI GPU
|
||||
{
|
||||
$od_clocks = phodevi_linux_parser::read_ati_overdrive('CurrentClocks');
|
||||
|
||||
if(is_array($od_clocks) && count($od_clocks) >= 2) // ATI OverDrive
|
||||
{
|
||||
$core_freq = array_shift($od_clocks);
|
||||
$mem_freq = array_pop($od_clocks);
|
||||
}
|
||||
}
|
||||
else if(phodevi::is_linux())
|
||||
{
|
||||
if(isset(phodevi::$vfs->radeon_pm_info))
|
||||
if(is_readable('/sys/class/drm/card0/device/pp_dpm_sclk'))
|
||||
{
|
||||
$pp = PHP_EOL . file_get_contents('/sys/class/drm/card0/device/pp_dpm_sclk');
|
||||
$pp = substr($pp, 0, strpos($pp, '*'));
|
||||
$pp = substr($pp, strrpos($pp, PHP_EOL));
|
||||
if(($x = strpos($pp, ': ')) !== false)
|
||||
{
|
||||
$pp = substr($pp, $x + 2);
|
||||
}
|
||||
$pp = trim(str_replace(array('*', 'Mhz'), '', $pp));
|
||||
if(is_numeric($pp))
|
||||
{
|
||||
$core_freq = $pp;
|
||||
if(is_readable('/sys/class/drm/card0/device/pp_dpm_mclk'))
|
||||
{
|
||||
$pp = PHP_EOL . file_get_contents('/sys/class/drm/card0/device/pp_dpm_mclk');
|
||||
$pp = substr($pp, 0, strpos($pp, '*'));
|
||||
$pp = substr($pp, strrpos($pp, PHP_EOL));
|
||||
if(($x = strpos($pp, ': ')) !== false)
|
||||
{
|
||||
$pp = substr($pp, $x + 2);
|
||||
}
|
||||
$pp = trim(str_replace(array('*', 'Mhz'), '', $pp));
|
||||
if(is_numeric($pp))
|
||||
{
|
||||
$mem_freq = $pp;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(isset(phodevi::$vfs->radeon_pm_info))
|
||||
{
|
||||
// radeon_pm_info should be present with Linux 2.6.34+
|
||||
foreach(pts_strings::trim_explode("\n", phodevi::$vfs->radeon_pm_info) as $pm_line)
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2009 - 2017, Phoronix Media
|
||||
Copyright (C) 2009 - 2017, Michael Larabel
|
||||
Copyright (C) 2009 - 2018, Phoronix Media
|
||||
Copyright (C) 2009 - 2018, 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
|
||||
@@ -72,6 +72,19 @@ class gpu_power extends phodevi_sensor
|
||||
}
|
||||
}
|
||||
}
|
||||
else if($power1_average = phodevi_linux_parser::read_sysfs_node('/sys/class/drm/card0/device/hwmon/hwmon*/power1_average', 'POSITIVE_NUMERIC'))
|
||||
{
|
||||
// AMDGPU path
|
||||
if(is_numeric($power1_average))
|
||||
{
|
||||
$power1_average = $power1_average / 1000000;
|
||||
if($power1_average > 10 && $power1_average < 600)
|
||||
{
|
||||
self::$unit = 'Watts';
|
||||
$gpu_power = $power1_average;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(is_readable('/sys/bus/i2c/drivers/ina3221x/0-0040/iio:device0/in_power0_input'))
|
||||
{
|
||||
$in_power0_input = pts_file_io::file_get_contents('/sys/bus/i2c/drivers/ina3221x/0-0040/iio:device0/in_power0_input');
|
||||
|
||||
@@ -35,10 +35,6 @@ class gpu_temp extends phodevi_sensor
|
||||
{
|
||||
$temp_c = phodevi_parser::read_nvidia_extension('GPUCoreTemp');
|
||||
}
|
||||
else if(phodevi::is_ati_graphics() && phodevi::is_linux())
|
||||
{
|
||||
$temp_c = phodevi_linux_parser::read_ati_overdrive('Temperature');
|
||||
}
|
||||
|
||||
if($temp_c == -1 || empty($temp_c))
|
||||
{
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2009 - 2015, Phoronix Media
|
||||
Copyright (C) 2009 - 2015, Michael Larabel
|
||||
Copyright (C) 2009 - 2018, Phoronix Media
|
||||
Copyright (C) 2009 - 2018, 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
|
||||
@@ -28,7 +28,6 @@ class gpu_usage extends phodevi_sensor
|
||||
const SENSOR_SENSES = 'usage';
|
||||
const SENSOR_UNIT = 'Percent';
|
||||
|
||||
private $probe_ati_overdrive = false;
|
||||
private $probe_radeontop = false;
|
||||
private $probe_nvidia_smi = false;
|
||||
private $probe_nvidia_settings = false;
|
||||
@@ -50,11 +49,7 @@ class gpu_usage extends phodevi_sensor
|
||||
{
|
||||
$gpu_usage = -1;
|
||||
|
||||
if($this->probe_ati_overdrive)
|
||||
{
|
||||
$gpu_usage = self::ati_overdrive_core_usage();
|
||||
}
|
||||
else if($this->probe_nvidia_settings)
|
||||
if($this->probe_nvidia_settings)
|
||||
{
|
||||
$gpu_usage = self::read_nvidia_settings_gpu_utilization();
|
||||
}
|
||||
@@ -66,17 +61,17 @@ class gpu_usage extends phodevi_sensor
|
||||
{
|
||||
$gpu_usage = self::radeontop_gpu_usage();
|
||||
}
|
||||
else if(is_file('/sys/class/drm/card0/device/gpu_busy_percent'))
|
||||
{
|
||||
$gpu_usage = pts_file_io::file_get_contents('/sys/class/drm/card0/device/gpu_busy_percent');
|
||||
}
|
||||
|
||||
return $gpu_usage;
|
||||
}
|
||||
|
||||
private function set_probe_mode()
|
||||
{
|
||||
if(phodevi::is_ati_graphics() && phodevi::is_linux())
|
||||
{
|
||||
$this->probe_ati_overdrive = true;
|
||||
}
|
||||
else if(phodevi::is_mesa_graphics() && pts_client::executable_in_path('radeontop'))
|
||||
if(phodevi::is_mesa_graphics() && pts_client::executable_in_path('radeontop'))
|
||||
{
|
||||
$this->probe_radeontop = true;
|
||||
}
|
||||
@@ -119,12 +114,6 @@ class gpu_usage extends phodevi_sensor
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private static function ati_overdrive_core_usage()
|
||||
{
|
||||
return phodevi_linux_parser::read_ati_overdrive('GPUload');
|
||||
}
|
||||
|
||||
private static function nvidia_core_usage()
|
||||
{
|
||||
$nvidia_smi = shell_exec(escapeshellarg(pts_client::executable_in_path('nvidia-smi')) . ' -a');
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2009 - 2015, Phoronix Media
|
||||
Copyright (C) 2009 - 2015, Michael Larabel
|
||||
Copyright (C) 2009 - 2018, Phoronix Media
|
||||
Copyright (C) 2009 - 2018, 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
|
||||
@@ -31,7 +31,23 @@ class gpu_voltage extends phodevi_sensor
|
||||
$sensor = -1;
|
||||
|
||||
// TODO XXX: Nouveau driver exposes GPU voltage on at least some cards via performance_level
|
||||
if(isset(phodevi::$vfs->radeon_pm_info))
|
||||
if(is_file('/sys/class/drm/card0/device/hwmon/hwmon1/in0_label') && pts_file_io::file_get_contents('/sys/class/drm/card0/device/hwmon/hwmon1/in0_label') == 'vddgfx' && is_file('/sys/class/drm/card0/device/hwmon/hwmon1/in0_input'))
|
||||
{
|
||||
$sensor = pts_file_io::file_get_contents('/sys/class/drm/card0/device/hwmon/hwmon1/in0_input');
|
||||
if(!is_numeric($sensor))
|
||||
{
|
||||
$sensor = -1;
|
||||
}
|
||||
}
|
||||
else if(is_file('/sys/class/drm/card0/device/hwmon/hwmon0/in0_label') && pts_file_io::file_get_contents('/sys/class/drm/card0/device/hwmon/hwmon0/in0_label') == 'vddgfx' && is_file('/sys/class/drm/card0/device/hwmon/hwmon0/in0_input'))
|
||||
{
|
||||
$sensor = pts_file_io::file_get_contents('/sys/class/drm/card0/device/hwmon/hwmon0/in0_input');
|
||||
if(!is_numeric($sensor))
|
||||
{
|
||||
$sensor = -1;
|
||||
}
|
||||
}
|
||||
else if(isset(phodevi::$vfs->radeon_pm_info))
|
||||
{
|
||||
// For Radeon power management it should be exposed on a line like:
|
||||
// voltage: 1140 mV
|
||||
|
||||
@@ -182,6 +182,7 @@ abstract class pts_graph_core
|
||||
$this->results = array();
|
||||
if($this->i['is_multi_way_comparison'])
|
||||
{
|
||||
$this->test_result->test_result_buffer->adjust_precision();
|
||||
foreach($this->test_result->test_result_buffer->buffer_items as $i => &$buffer_item)
|
||||
{
|
||||
if($buffer_item->get_result_value() === null)
|
||||
@@ -236,6 +237,7 @@ abstract class pts_graph_core
|
||||
}
|
||||
else if(isset($this->test_result->test_result_buffer))
|
||||
{
|
||||
$this->test_result->test_result_buffer->adjust_precision();
|
||||
foreach($this->test_result->test_result_buffer->buffer_items as $i => &$buffer_item)
|
||||
{
|
||||
if($buffer_item->get_result_value() === null)
|
||||
@@ -440,45 +442,12 @@ abstract class pts_graph_core
|
||||
}
|
||||
protected function identifier_to_branded_color($identifier, $fallback_color = null)
|
||||
{
|
||||
if($this->i['support_color_branding'] == false || !isset($identifier[6]))
|
||||
if($this->i['support_color_branding'] == false || !isset($identifier[5]))
|
||||
{
|
||||
return $fallback_color;
|
||||
}
|
||||
|
||||
// See if the result identifier matches something to be color-coded better
|
||||
$identifier = strtolower($identifier) . ' ';
|
||||
if(strpos($identifier, 'geforce') !== false || strpos($identifier, 'nvidia') !== false || strpos($identifier, 'quadro') !== false)
|
||||
{
|
||||
$paint_color = '#77b900';
|
||||
}
|
||||
else if(strpos($identifier, 'radeon') !== false || strpos($identifier, 'amd ') !== false || stripos($identifier, 'EPYC') !== false || strpos($identifier, 'opteron ') !== false || strpos($identifier, 'fx-') !== false || strpos($identifier, 'firepro ') !== false || strpos($identifier, 'ryzen ') !== false || strpos($identifier, 'threadripper ') !== false || strpos($identifier, 'a10-') !== false)
|
||||
{
|
||||
$paint_color = '#f1052d';
|
||||
}
|
||||
else if(strpos($identifier, 'intel ') !== false || strpos($identifier, 'xeon ') !== false || strpos($identifier, 'core i') !== false || strpos($identifier, 'pentium') !== false || strpos($identifier, 'celeron') !== false)
|
||||
{
|
||||
$paint_color = '#0b5997';
|
||||
}
|
||||
else if(strpos($identifier, 'bsd') !== false)
|
||||
{
|
||||
$paint_color = '#850000';
|
||||
}
|
||||
else if(stripos($identifier, 'windows ') !== false || stripos($identifier, 'Microsoft') !== false)
|
||||
{
|
||||
$paint_color = '#373277';
|
||||
}
|
||||
else if(stripos($identifier, 'ec2 ') !== false || stripos($identifier, 'Amazon') !== false)
|
||||
{
|
||||
$paint_color = '#ff9900';
|
||||
}
|
||||
else if(stripos($identifier, 'google') !== false)
|
||||
{
|
||||
$paint_color = '#4885ed';
|
||||
}
|
||||
else
|
||||
{
|
||||
$paint_color = $fallback_color;
|
||||
}
|
||||
$paint_color = pts_render::identifier_to_brand_color($identifier, $fallback_color);
|
||||
|
||||
if($paint_color != $fallback_color && strpos($identifier, ' - '))
|
||||
{
|
||||
@@ -846,7 +815,13 @@ abstract class pts_graph_core
|
||||
$tick_width = round(($left_end - $left_start) / $this->i['mark_count']);
|
||||
$display_value = $this->i['graph_min_value'];
|
||||
|
||||
$g = $this->svg_dom->make_g(array('font-size' => self::$c['size']['tick_mark'], 'fill' => self::$c['color']['text'], 'text-anchor' => 'middle'));
|
||||
$tick_font_size = self::$c['size']['tick_mark'];
|
||||
while($this->i['graph_max_value'] > 100000 && self::text_string_width($this->i['graph_max_value'], $tick_font_size) + 4 > $tick_width)
|
||||
{
|
||||
$tick_font_size--;
|
||||
}
|
||||
|
||||
$g = $this->svg_dom->make_g(array('font-size' => $tick_font_size, 'fill' => self::$c['color']['text'], 'text-anchor' => 'middle'));
|
||||
$g_lines = $this->svg_dom->make_g(array('stroke' => self::$c['color']['body'], 'stroke-width' => 1));
|
||||
for($i = 0; $i < $this->i['mark_count']; $i++)
|
||||
{
|
||||
@@ -993,7 +968,7 @@ abstract class pts_graph_core
|
||||
// Adjust the color based on the identifier and the content of value_highlights
|
||||
if($this->i['highlight_values'] && (array_key_exists($identifier, $this->i['highlight_values']) || in_array($identifier, $this->i['highlight_values'])))
|
||||
{
|
||||
$color = $this->i['highlight_values'][$identifier];
|
||||
$color = isset($this->i['highlight_values'][$identifier]) ? $this->i['highlight_values'][$identifier] : null;
|
||||
$paint_color = empty($color) ? $this->darken_color($paint_color) : $color;
|
||||
}
|
||||
return $paint_color;
|
||||
|
||||
@@ -100,7 +100,7 @@ class pts_graph_vertical_bars extends pts_graph_core
|
||||
|
||||
while(floor($bar_width * 0.8) < self::text_string_width($this->i['graph_max_value'] + 0.01, floor(self::$c['size']['bars'] * $bar_font_size_ratio)) && $bar_font_size_ratio >= 0.6)
|
||||
{
|
||||
$bar_font_size_ratio -= 0.1;
|
||||
$bar_font_size_ratio -= 0.05;
|
||||
}
|
||||
|
||||
$i_o = 0;
|
||||
@@ -149,7 +149,7 @@ class pts_graph_vertical_bars extends pts_graph_core
|
||||
if(($px_bound_right - $px_bound_left) > 10)
|
||||
{
|
||||
// The bars are too skinny to be able to plot anything on them
|
||||
if($bar_font_size_ratio >= 0.6)
|
||||
if($bar_font_size_ratio >= 0.5)
|
||||
{
|
||||
$x = $px_bound_left + (($px_bound_right - $px_bound_left) / 2);
|
||||
$this->svg_dom->add_text_element($value, array('x' => $x, 'y' => ($value_plot_top + 2), 'font-size' => floor(self::$c['size']['bars'] * $bar_font_size_ratio), 'fill' => self::$c['color']['body_text'], 'text-anchor' => 'middle', 'dominant-baseline' => 'text-before-edge'));
|
||||
|
||||
341
pts-core/objects/pts_ae_data.php
Normal file
341
pts-core/objects/pts_ae_data.php
Normal file
@@ -0,0 +1,341 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2010 - 2019, Phoronix Media
|
||||
Copyright (C) 2010 - 2019, 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
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
class pts_ae_data
|
||||
{
|
||||
private $db;
|
||||
private $ae_dir;
|
||||
|
||||
public function __construct($output_dir)
|
||||
{
|
||||
if(!is_dir($output_dir))
|
||||
{
|
||||
echo 'valid directory needed!';
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->ae_dir = $output_dir . '/';
|
||||
$db_flags = SQLITE3_OPEN_READWRITE | SQLITE3_OPEN_CREATE;
|
||||
$this->db = new SQLite3($this->ae_dir . 'temp.db', $db_flags);
|
||||
$this->db->busyTimeout(10000);
|
||||
// TODO XXX make this a rootadmin option or something
|
||||
$this->db->exec('PRAGMA journal_mode = WAL');
|
||||
$this->db->exec('PRAGMA synchronous = OFF');
|
||||
pts_file_io::mkdir($this->ae_dir . 'comparison-hashes/');
|
||||
|
||||
$result = $this->db->query('PRAGMA user_version;');
|
||||
$result = $result->fetchArray();
|
||||
$version = isset($result['user_version']) && is_numeric($result['user_version']) ? $result['user_version'] : 0;
|
||||
switch($version)
|
||||
{
|
||||
case 0:
|
||||
// Create
|
||||
$this->db->exec('CREATE TABLE `analytics_results` ( `ID` INTEGER PRIMARY KEY AUTOINCREMENT, `ResultReference` TEXT, `ComparisonHash` TEXT, `Component` INTEGER, `RelatedComponent` INTEGER, `DateTime` INTEGER, `SystemType` TEXT, `SystemLayer` TEXT, `Result` REAL NOT NULL);');
|
||||
$this->db->exec('CREATE INDEX `comp_hashes` ON `analytics_results` (`ComparisonHash`,`Result`);');
|
||||
$this->db->exec('CREATE INDEX `result_and_component_search` ON `analytics_results` (`ComparisonHash`,`Component`,`Result`);');
|
||||
$this->db->exec('CREATE TABLE `components` (`ComponentID` INTEGER PRIMARY KEY AUTOINCREMENT,`Component` TEXT UNIQUE,`Category` INTEGER,`TimesAppeared` INTEGER);');
|
||||
$this->db->exec('CREATE INDEX `quick` ON `components` ( `ComponentID`, `Component`);');
|
||||
$this->db->exec('CREATE INDEX `by_cat` ON `components` (`Component`,`Category`,`TimesAppeared`);');
|
||||
$this->db->exec('CREATE TABLE `component_categories` (`CategoryID` INTEGER PRIMARY KEY AUTOINCREMENT,`Category` TEXT UNIQUE);');
|
||||
$this->db->exec('CREATE INDEX `quick_cat` ON `component_categories` ( `CategoryID`, `Category`);');
|
||||
$this->db->exec('CREATE TABLE `composite` (`ComparisonHash` TEXT UNIQUE,`TestProfile` TEXT,`Title` TEXT,`ArgumentsDescription` TEXT,`HigherIsBetter` INTEGER,`SampleSize` INTEGER, Percentiles TEXT, FirstAppeared INTEGER, LastAppeared INTEGER, PRIMARY KEY(`ComparisonHash`));');
|
||||
$this->db->exec('CREATE INDEX `tp` ON `composite` (`TestProfile`);');
|
||||
$this->db->exec('CREATE UNIQUE INDEX `unq` ON `analytics_results` (`DateTime`,`Result`,`Component`,`RelatedComponent`,`ComparisonHash`);');
|
||||
//$this->db->exec('');
|
||||
//$this->db->exec('');
|
||||
//$this->db->exec('');
|
||||
$this->db->exec('PRAGMA user_version = 1');
|
||||
}
|
||||
return true;
|
||||
}
|
||||
public function insert_composite_hash_entry_by_result_object($comparison_hash, &$result_object)
|
||||
{
|
||||
$stmt = $this->db->prepare('INSERT OR IGNORE INTO composite (ComparisonHash, TestProfile, Title, ArgumentsDescription, HigherIsBetter) VALUES (:ch, :tp, :t, :ad, :hib)');
|
||||
$stmt->bindValue(':ch', $comparison_hash);
|
||||
$stmt->bindValue(':tp', $result_object->test_profile->get_identifier(false));
|
||||
$stmt->bindValue(':t', $result_object->test_profile->get_title());
|
||||
$stmt->bindValue(':ad', $result_object->get_arguments_description());
|
||||
$stmt->bindValue(':hib', ($result_object->test_profile->get_result_proportion() == 'HIB' ? 1 : 0));
|
||||
$result = $stmt->execute();
|
||||
}
|
||||
public function insert_result_into_analytic_results($comparison_hash, $result_reference, $component, $category, $related_component, $related_category, $result, $datetime, $system_type, $system_layer)
|
||||
{
|
||||
$stmt = $this->db->prepare('INSERT OR IGNORE INTO analytics_results (ComparisonHash, ResultReference, Component, RelatedComponent, Result, DateTime, SystemType, SystemLayer) VALUES (:ch, :rr, :c, :rc, :r, :dt, :st, :sl)');
|
||||
$stmt->bindValue(':ch', $comparison_hash);
|
||||
$stmt->bindValue(':rr', $result_reference);
|
||||
$stmt->bindValue(':c', $this->component_to_component_id($component, $category));
|
||||
$stmt->bindValue(':rc', $this->component_to_component_id($related_component, $related_category));
|
||||
$stmt->bindValue(':r', $result);
|
||||
$stmt->bindValue(':dt', $datetime);
|
||||
$stmt->bindValue(':st', $system_type);
|
||||
$stmt->bindValue(':sl', $system_layer);
|
||||
$result = $stmt->execute();
|
||||
}
|
||||
public function component_to_component_id($component, $category)
|
||||
{
|
||||
static $cache;
|
||||
if(isset($cache[$component][$category]))
|
||||
{
|
||||
return $cache[$component][$category];
|
||||
}
|
||||
$stmt = $this->db->prepare('SELECT ComponentID FROM components WHERE Component = :c LIMIT 1');
|
||||
$stmt->bindValue(':c', $component);
|
||||
$result = $stmt ? $stmt->execute() : false;
|
||||
|
||||
if($result && ($row = $result->fetchArray()))
|
||||
{
|
||||
$cache[$component][$category] = $row['ComponentID'];
|
||||
return $row['ComponentID'];
|
||||
}
|
||||
|
||||
$stmt = $this->db->prepare('INSERT OR IGNORE INTO components (Component, Category) VALUES (:component, :category)');
|
||||
$stmt->bindValue(':component', $component);
|
||||
$stmt->bindValue(':category', $this->category_to_category_id($category));
|
||||
$result = $stmt->execute();
|
||||
$cache[$component][$category] = $this->db->lastInsertRowid();
|
||||
return $cache[$component][$category];
|
||||
}
|
||||
public function component_id_to_component($component_id)
|
||||
{
|
||||
static $cache;
|
||||
if(isset($cache[$component_id]))
|
||||
{
|
||||
return $cache[$component_id];
|
||||
}
|
||||
$stmt = $this->db->prepare('SELECT Component FROM components WHERE ComponentID = :c LIMIT 1');
|
||||
$stmt->bindValue(':c', $component_id);
|
||||
$result = $stmt ? $stmt->execute() : false;
|
||||
|
||||
if($result && ($row = $result->fetchArray()))
|
||||
{
|
||||
$cache[$component_id] = $row['Component'];
|
||||
return $cache[$component_id];
|
||||
}
|
||||
}
|
||||
public function category_to_category_id($category)
|
||||
{
|
||||
static $cache;
|
||||
if(isset($cache[$category]))
|
||||
{
|
||||
return $cache[$category];
|
||||
}
|
||||
$stmt = $this->db->prepare('SELECT CategoryID FROM component_categories WHERE Category = :c LIMIT 1');
|
||||
$stmt->bindValue(':c', $category);
|
||||
$result = $stmt ? $stmt->execute() : false;
|
||||
|
||||
if($result && ($row = $result->fetchArray()))
|
||||
{
|
||||
$cache[$category] = $row['CategoryID'];
|
||||
return $row['CategoryID'];
|
||||
}
|
||||
|
||||
$stmt = $this->db->prepare('INSERT OR IGNORE INTO component_categories (Category) VALUES (:category)');
|
||||
$stmt->bindValue(':category', $category);
|
||||
$result = $stmt->execute();
|
||||
$cache[$category] = $this->db->lastInsertRowid();
|
||||
return $cache[$category];
|
||||
}
|
||||
public function rebuild_composite_listing()
|
||||
{
|
||||
$stmt = $this->db->prepare('SELECT * FROM composite');
|
||||
$result = $stmt ? $stmt->execute() : false;
|
||||
|
||||
while($result && ($row = $result->fetchArray()))
|
||||
{
|
||||
$comparison_hash = $row['ComparisonHash'];
|
||||
$first_appeared = 0;
|
||||
$last_appeared = 0;
|
||||
$component_results = array();
|
||||
$component_dates = array();
|
||||
$system_types = array();
|
||||
$results = $this->get_results_array_by_comparison_hash($comparison_hash, $first_appeared, $last_appeared, $component_results, $component_dates, $system_types);
|
||||
|
||||
if(count($results) < 30)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$percentiles = array();
|
||||
for($i = 0; $i < 100; $i++)
|
||||
{
|
||||
$percentiles[$i] = pts_math::find_percentile($results, ($i * 0.01));
|
||||
}
|
||||
|
||||
$peak = max($results);
|
||||
|
||||
$component_data = array();
|
||||
$comparison_components = array();
|
||||
foreach($component_results as $component => $d)
|
||||
{
|
||||
if(stripos($component . ' ', 'device ') !== false || stripos($component, 'unknown') !== false || is_numeric($component))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
foreach($d as $related_component => $data)
|
||||
{
|
||||
if(!isset($comparison_components[$component]))
|
||||
{
|
||||
$comparison_components[$component] = array();
|
||||
}
|
||||
$comparison_components[$component] = array_merge($comparison_components[$component], $data);
|
||||
|
||||
if(stripos($related_component . ' ', 'device ') !== false || stripos($related_component, 'unknown') !== false)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if($component_dates[$component][$related_component]['last_appeared'] < (time() - (31536000 * 2)))
|
||||
{
|
||||
// if no new results in 4 years, likely outdated...
|
||||
continue;
|
||||
}
|
||||
if(count($data) < 8)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
$data = pts_math::remove_outliers($data);
|
||||
if(count($data) < 8)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
$component_data[$component][$related_component]['avg'] = round(array_sum($data) / count($data), ($peak > 60 ? 0 : 2));
|
||||
$component_data[$component][$related_component]['samples'] = count($data);
|
||||
$component_data[$component][$related_component]['first_appeared'] = $component_dates[$component][$related_component]['first_appeared'];
|
||||
$component_data[$component][$related_component]['last_appeared'] = $component_dates[$component][$related_component]['last_appeared'];
|
||||
$component_data[$component][$related_component]['system_type'] = $system_types[$component][$related_component];
|
||||
}
|
||||
}
|
||||
|
||||
foreach($comparison_components as $component => &$values)
|
||||
{
|
||||
$values = pts_math::remove_outliers($values);
|
||||
if(count($values) < 6)
|
||||
{
|
||||
unset($comparison_components[$component]);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
uasort($comparison_components, array('pts_ae_data', 'sort_array_by_size_of_array_in_value'));
|
||||
$comparison_components = array_slice($comparison_components, 0, 50);
|
||||
foreach($comparison_components as $component => &$values)
|
||||
{
|
||||
$values = round(array_sum($values) / count($values), ($peak > 60 ? 0 : 2));
|
||||
}
|
||||
|
||||
if($row['HigherIsBetter'] == '1')
|
||||
{
|
||||
arsort($comparison_components);
|
||||
}
|
||||
else
|
||||
{
|
||||
asort($comparison_components);
|
||||
}
|
||||
|
||||
|
||||
// JSON FILE
|
||||
$json = array();
|
||||
$json['comparison_hash'] = $comparison_hash;
|
||||
$json['test_profile'] = $row['TestProfile'];
|
||||
$json['title'] = $row['Title'];
|
||||
$json['description'] = $row['ArgumentsDescription'];
|
||||
$json['hib'] = $row['HigherIsBetter'];
|
||||
$json['samples'] = count($results);
|
||||
$json['first_appeared'] = $first_appeared;
|
||||
$json['last_appeared'] = $last_appeared;
|
||||
$json['percentiles'] = $percentiles;
|
||||
$json['components'] = $component_data;
|
||||
$json['reference_results'] = $comparison_components;
|
||||
|
||||
$json = json_encode($json);
|
||||
if(!empty($json))
|
||||
{
|
||||
$test_dir = base64_encode($row['TestProfile']);
|
||||
pts_file_io::mkdir($this->ae_dir . 'comparison-hashes/' . $test_dir . '/');
|
||||
file_put_contents($this->ae_dir . 'comparison-hashes/' . $test_dir . '/' . $comparison_hash . '.json', $json);
|
||||
}
|
||||
// EO JSON
|
||||
|
||||
$stmt = $this->db->prepare('UPDATE composite SET SampleSize = :ss, Percentiles = :p, FirstAppeared = :fa, LastAppeared = :la WHERE ComparisonHash = :ch');
|
||||
$stmt->bindValue(':ss', count($results));
|
||||
$stmt->bindValue(':ch', $comparison_hash);
|
||||
$stmt->bindValue(':p', implode(',', $percentiles));
|
||||
$stmt->bindValue(':fa', $first_appeared);
|
||||
$stmt->bindValue(':la', $last_appeared);
|
||||
$stmt->execute();
|
||||
}
|
||||
}
|
||||
public function sort_array_by_size_of_array_in_value($a, $b)
|
||||
{
|
||||
return count($b) - count($a);
|
||||
}
|
||||
public function get_results_array_by_comparison_hash($ch, &$first_appeared, &$last_appeared, &$component_results, &$component_dates, &$system_types)
|
||||
{
|
||||
$stmt = $this->db->prepare('SELECT Result, DateTime, Component, RelatedComponent, SystemType, SystemLayer FROM analytics_results WHERE ComparisonHash = :ch');
|
||||
$stmt->bindValue(':ch', $ch);
|
||||
$result = $stmt ? $stmt->execute() : false;
|
||||
$results = array();
|
||||
$first_appeared = time();
|
||||
$last_appeared = 0;
|
||||
while($result && ($row = $result->fetchArray()))
|
||||
{
|
||||
if(!is_numeric($row['Result']))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
$dt = $row['DateTime'];
|
||||
if($dt < $first_appeared)
|
||||
{
|
||||
$first_appeared = $dt;
|
||||
}
|
||||
else if($dt > $last_appeared || $last_appeared == 0)
|
||||
{
|
||||
$last_appeared = $dt;
|
||||
}
|
||||
$results[] = $row['Result'];
|
||||
if(!empty($row['SystemLayer']) || strlen($row['Component']) < 3)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$c = $this->component_id_to_component($row['Component']);
|
||||
$rc = $this->component_id_to_component($row['RelatedComponent']);
|
||||
if(!isset($component_results[$c][$rc]))
|
||||
{
|
||||
$component_results[$c][$rc] = array();
|
||||
}
|
||||
$component_results[$c][$rc][] = $row['Result'];
|
||||
if(!isset($component_dates[$c][$rc]))
|
||||
{
|
||||
$component_dates[$c][$rc] = array('first_appeared' => $dt, 'last_appeared' => $dt);
|
||||
}
|
||||
else
|
||||
{
|
||||
$component_dates[$c][$rc]['first_appeared'] = min($component_dates[$c][$rc]['first_appeared'], $dt);
|
||||
$component_dates[$c][$rc]['last_appeared'] = max($component_dates[$c][$rc]['last_appeared'], $dt);
|
||||
}
|
||||
$system_types[$c][$rc] = $row['SystemType'];
|
||||
}
|
||||
return $results;
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -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 - 2019, Phoronix Media
|
||||
Copyright (C) 2008 - 2019, 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
|
||||
@@ -62,6 +62,33 @@ class pts_arrays
|
||||
|
||||
return $duplicates;
|
||||
}
|
||||
public static function array_to_cleansed_item_string($items)
|
||||
{
|
||||
$items_formatted = $items;
|
||||
$items = array();
|
||||
|
||||
for($i = 0; $i < count($items_formatted); $i++)
|
||||
{
|
||||
if(!empty($items_formatted[$i]))
|
||||
{
|
||||
$times_found = 1;
|
||||
|
||||
for($j = ($i + 1); $j < count($items_formatted); $j++)
|
||||
{
|
||||
if($items_formatted[$i] == $items_formatted[$j])
|
||||
{
|
||||
$times_found++;
|
||||
$items_formatted[$j] = '';
|
||||
}
|
||||
}
|
||||
$item = ($times_found > 1 ? $times_found . ' x ' : null) . $items_formatted[$i];
|
||||
array_push($items, $item);
|
||||
}
|
||||
}
|
||||
$items = implode(' + ', $items);
|
||||
|
||||
return $items;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -140,6 +140,24 @@ class pts_file_io
|
||||
|
||||
return $success;
|
||||
}
|
||||
public static function recursively_find_files_in_directory($dir, &$found_files, $file_extension = null)
|
||||
{
|
||||
$tree = glob(rtrim($dir, '/') . '/*');
|
||||
if(is_array($tree))
|
||||
{
|
||||
foreach($tree as $file)
|
||||
{
|
||||
if(is_dir($file))
|
||||
{
|
||||
self::recursively_find_files_in_directory($file, $found_files, $file_extension);
|
||||
}
|
||||
else if(is_file($file) && ($file_extension == null || substr($file, 0 - strlen($file_extension)) == $file_extension))
|
||||
{
|
||||
$found_files[] = $file;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2009 - 2016, Phoronix Media
|
||||
Copyright (C) 2009 - 2016, Michael Larabel
|
||||
Copyright (C) 2009 - 2019, Phoronix Media
|
||||
Copyright (C) 2009 - 2019, 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
|
||||
@@ -24,23 +24,18 @@ class pts_math
|
||||
{
|
||||
public static function geometric_mean($values)
|
||||
{
|
||||
// default
|
||||
return pow(array_product($values), (1 / count($values)));
|
||||
}
|
||||
public static function harmonic_mean($values)
|
||||
{
|
||||
$b = 0;
|
||||
$c = 0;
|
||||
|
||||
foreach($values as $value)
|
||||
// useful for rates / all same result types
|
||||
$sum = 0;
|
||||
foreach($values as $v)
|
||||
{
|
||||
if($value != 0)
|
||||
{
|
||||
$b += 1 / $value;
|
||||
$c++;
|
||||
}
|
||||
$sum += 1 / $v;
|
||||
}
|
||||
|
||||
return $b != 0 ? $c / $b : 0;
|
||||
return (1 / $sum) * count($values);
|
||||
}
|
||||
public static function standard_error($values)
|
||||
{
|
||||
|
||||
@@ -49,9 +49,6 @@ class pts_network
|
||||
{
|
||||
return false;
|
||||
}
|
||||
//echo $url . PHP_EOL; var_dump($to_post_data);
|
||||
//var_dump(debug_backtrace());
|
||||
//exit;
|
||||
|
||||
$stream_context = pts_network::stream_context_create(null, $override_proxy, $override_proxy_port, $override_proxy_user, $override_proxy_pw, $http_timeout);
|
||||
$contents = pts_file_io::file_get_contents($url, 0, $stream_context);
|
||||
@@ -76,11 +73,8 @@ class pts_network
|
||||
{
|
||||
return false;
|
||||
}
|
||||
//echo $url . PHP_EOL; var_dump($to_post_data);
|
||||
//var_dump(debug_backtrace());
|
||||
//exit;
|
||||
$upload_data = http_build_query($to_post_data);
|
||||
$http_parameters = array('http' => array('method' => 'POST', 'content' => $upload_data));
|
||||
|
||||
$http_parameters = array('http' => array('method' => 'POST', 'content' => http_build_query($to_post_data)));
|
||||
if($supports_proxy)
|
||||
{
|
||||
$stream_context = pts_network::stream_context_create($http_parameters);
|
||||
@@ -110,8 +104,11 @@ class pts_network
|
||||
$download = str_replace('https://', 'http://', $download);
|
||||
}
|
||||
|
||||
if(function_exists('curl_init') && stripos(PTS_PHP_VERSION, 'hiphop') === false)
|
||||
if(PTS_IS_CLIENT && strpos(phodevi::read_property('system', 'operating-system'), ' 7') === false && function_exists('curl_init') && stripos(PTS_PHP_VERSION, 'hiphop') === false)
|
||||
{
|
||||
// XXX: RHEL/EL 7.6 PHP packages introduced a segv when using CURL... Until that's resolved, just blacklist " 7"
|
||||
// as unknown when it will be fixed, but at least there is non-CURL codepath supported fine
|
||||
// " 7" is a bit liberal but also hard due to various EL7 downstreams
|
||||
// XXX: Facebook HipHop HHVM currently seems to have problems with PHP CURL
|
||||
$return_state = pts_network::curl_download($download, $to);
|
||||
}
|
||||
|
||||
@@ -262,8 +262,8 @@ class pts_openbenchmarking
|
||||
// OpenSSL seems to have problems on OpenIndiana at least, TODO: investigate
|
||||
// Using a proxy seems to have problems for HTTPS
|
||||
// TODO XXX
|
||||
//$host = ((extension_loaded('openssl') && getenv('NO_OPENSSL') == false && php_uname('s') == 'Linux' && (!PTS_IS_CLIENT || !pts_network::is_proxy_setup())) ? 'https://' : 'http://') . 'openbenchmarking.org/';
|
||||
$host = 'http://openbenchmarking.org/';
|
||||
$host = ((extension_loaded('openssl') && getenv('NO_OPENSSL') == false && (!PTS_IS_CLIENT || !pts_network::is_proxy_setup())) ? 'https://' : 'http://') . 'openbenchmarking.org/';
|
||||
//$host = 'http://openbenchmarking.org/';
|
||||
}
|
||||
|
||||
return $host;
|
||||
@@ -336,26 +336,29 @@ class pts_openbenchmarking
|
||||
$repo_index = json_decode(file_get_contents($index_file), true);
|
||||
$generated_time = $repo_index['main']['generated'];
|
||||
|
||||
// Refreshing the indexes once every few days should be suffice
|
||||
// Refresh approximately every three days by default
|
||||
$index_cache_ttl = 3;
|
||||
if(PTS_IS_CLIENT && ($config_ttl = pts_config::read_user_config('PhoronixTestSuite/Options/OpenBenchmarking/IndexCacheTTL')))
|
||||
if($force_refresh == false)
|
||||
{
|
||||
if($config_ttl === 0)
|
||||
// Refreshing the indexes once every few days should be suffice
|
||||
// Refresh approximately every three days by default
|
||||
$index_cache_ttl = 3;
|
||||
if(PTS_IS_CLIENT && ($config_ttl = pts_config::read_user_config('PhoronixTestSuite/Options/OpenBenchmarking/IndexCacheTTL')))
|
||||
{
|
||||
// if the value is 0, only rely upon manual refreshes
|
||||
if($config_ttl === 0)
|
||||
{
|
||||
// if the value is 0, only rely upon manual refreshes
|
||||
continue;
|
||||
}
|
||||
else if(is_numeric($config_ttl) && $config_ttl >= 1)
|
||||
{
|
||||
$index_cache_ttl = $config_ttl;
|
||||
}
|
||||
}
|
||||
|
||||
if($generated_time > (time() - (86400 * $index_cache_ttl)) && (!defined('FIRST_RUN_ON_PTS_UPGRADE') || FIRST_RUN_ON_PTS_UPGRADE == false))
|
||||
{
|
||||
// The index is new enough
|
||||
continue;
|
||||
}
|
||||
else if(is_numeric($config_ttl) && $config_ttl >= 1)
|
||||
{
|
||||
$index_cache_ttl = $config_ttl;
|
||||
}
|
||||
}
|
||||
|
||||
if($generated_time > (time() - (86400 * $index_cache_ttl)) && $force_refresh == false && (!defined('FIRST_RUN_ON_PTS_UPGRADE') || FIRST_RUN_ON_PTS_UPGRADE == false))
|
||||
{
|
||||
// The index is new enough
|
||||
continue;
|
||||
}
|
||||
|
||||
$old_index = $repo_index;
|
||||
|
||||
@@ -225,7 +225,7 @@ class pts_render
|
||||
|
||||
$result_object->test_profile->set_display_format('BAR_GRAPH');
|
||||
}
|
||||
else if($big_data_set > 0 && pts_graph_core::get_graph_config('style', 'allow_box_plots'))
|
||||
else if($big_data_set > 0 && pts_graph_core::get_graph_config('style', 'allow_box_plots') && !isset($extra_attributes['no_box_plots']))
|
||||
{
|
||||
$result_object->test_profile->set_display_format('HORIZONTAL_BOX_PLOT');
|
||||
}
|
||||
@@ -298,6 +298,54 @@ class pts_render
|
||||
|
||||
return $graph;
|
||||
}
|
||||
public static function identifier_to_brand_color($identifier, $fallback_color = null)
|
||||
{
|
||||
static $cache;
|
||||
|
||||
if(isset($cache[$identifier]))
|
||||
{
|
||||
return $cache[$identifier] != null ? $cache[$identifier] : $fallback_color;
|
||||
}
|
||||
|
||||
// See if the result identifier matches something to be color-coded better
|
||||
$i = strtolower($identifier) . ' ';
|
||||
if(strpos($i, 'geforce') !== false || strpos($i, 'nvidia') !== false || strpos($i, 'quadro') !== false || strpos($i, 'rtx ') !== false || strpos($i, 'gtx ') !== false)
|
||||
{
|
||||
$paint_color = '#77b900';
|
||||
}
|
||||
else if(strpos($i, 'radeon') !== false || strpos($i, 'amd ') !== false || stripos($i, 'EPYC') !== false || strpos($i, 'opteron ') !== false || strpos($i, 'fx-') !== false || strpos($i, 'firepro ') !== false || strpos($i, 'ryzen ') !== false || strpos($i, 'threadripper ') !== false || strpos($i, 'a10-') !== false || strpos($i, 'athlon ') !== false || (strpos($i, 'r9 ') !== false && strpos($i, 'power9 ') === false) || strpos($i, 'r7 ') !== false || strpos($i, 'hd 7') !== false || strpos($i, 'rx ') !== false)
|
||||
{
|
||||
$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)
|
||||
{
|
||||
$paint_color = '#0b5997';
|
||||
}
|
||||
else if(strpos($i, 'bsd') !== false)
|
||||
{
|
||||
$paint_color = '#850000';
|
||||
}
|
||||
else if(stripos($i, 'windows ') !== false || stripos($i, 'Microsoft') !== false)
|
||||
{
|
||||
$paint_color = '#373277';
|
||||
}
|
||||
else if(stripos($i, 'ec2 ') !== false || stripos($i, 'Amazon') !== false)
|
||||
{
|
||||
$paint_color = '#ff9900';
|
||||
}
|
||||
else if(stripos($i, 'google') !== false)
|
||||
{
|
||||
$paint_color = '#4885ed';
|
||||
}
|
||||
else
|
||||
{
|
||||
$paint_color = $fallback_color;
|
||||
}
|
||||
|
||||
$cache[$identifier] = $paint_color != $fallback_color ? $paint_color : null;
|
||||
|
||||
return $paint_color;
|
||||
}
|
||||
public static function report_system_notes_to_table(&$result_file, &$table)
|
||||
{
|
||||
$identifier_count = 0;
|
||||
@@ -610,79 +658,8 @@ class pts_render
|
||||
}
|
||||
public static function generate_overview_object(&$overview_table, $overview_type)
|
||||
{
|
||||
switch($overview_type)
|
||||
{
|
||||
case 'GEOMETRIC_MEAN':
|
||||
$title = 'Geometric Mean';
|
||||
$math_call = array('pts_math', 'geometric_mean');
|
||||
break;
|
||||
case 'HARMONIC_MEAN':
|
||||
$title = 'Harmonic Mean';
|
||||
$math_call = array('pts_math', 'harmonic_mean');
|
||||
break;
|
||||
case 'AGGREGATE_SUM':
|
||||
$title = 'Aggregate Sum';
|
||||
$math_call = 'array_sum';
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
|
||||
}
|
||||
$result_buffer = new pts_test_result_buffer();
|
||||
|
||||
if($overview_table instanceof pts_result_file)
|
||||
{
|
||||
list($days_keys1, $days_keys, $shred) = pts_ResultFileTable::result_file_to_result_table($overview_table);
|
||||
|
||||
foreach($shred as $system_key => &$system)
|
||||
{
|
||||
$to_show = array();
|
||||
|
||||
foreach($system as &$days)
|
||||
{
|
||||
$days = $days->get_value();
|
||||
}
|
||||
|
||||
$to_show[] = pts_math::set_precision(call_user_func($math_call, $system), 2);
|
||||
$result_buffer->add_test_result($system_key, implode(',', $to_show), null);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$days_keys = null;
|
||||
foreach($overview_table as $system_key => &$system)
|
||||
{
|
||||
if($days_keys == null)
|
||||
{
|
||||
// Rather messy and inappropriate way of getting the days keys
|
||||
$days_keys = array_keys($system);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
foreach($overview_table as $system_key => &$system)
|
||||
{
|
||||
$to_show = array();
|
||||
|
||||
foreach($system as &$days)
|
||||
{
|
||||
$to_show[] = call_user_func($math_call, $days);
|
||||
}
|
||||
|
||||
$result_buffer->add_test_result($system_key, implode(',', $to_show), null);
|
||||
}
|
||||
}
|
||||
|
||||
$test_profile = new pts_test_profile(null, null, false);
|
||||
$test_profile->set_test_title($title);
|
||||
$test_profile->set_result_scale($title);
|
||||
$test_profile->set_display_format('BAR_GRAPH');
|
||||
|
||||
$test_result = new pts_test_result($test_profile);
|
||||
$test_result->set_used_arguments_description('Analytical Overview');
|
||||
$test_result->set_test_result_buffer($result_buffer);
|
||||
|
||||
return $test_result;
|
||||
// TODO XXX this can be removed once OpenBenchmarking.org upgrades its PTS to new pts_result_file_analyzer APIs
|
||||
// EOL 9 JANUARY 2019
|
||||
}
|
||||
public static function multi_way_identifier_check($identifiers)
|
||||
{
|
||||
|
||||
@@ -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 - 2019, Phoronix Media
|
||||
Copyright (C) 2008 - 2019, 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
|
||||
@@ -36,8 +36,9 @@ class pts_result_file
|
||||
private $preset_environment_variables = null;
|
||||
private $systems = null;
|
||||
private $is_tracker = -1;
|
||||
private $last_modified = null;
|
||||
|
||||
public function __construct($result_file, $read_only_result_objects = false)
|
||||
public function __construct($result_file, $read_only_result_objects = false, $parse_only_qualified_result_objects = false)
|
||||
{
|
||||
$this->save_identifier = $result_file;
|
||||
$this->extra_attributes = array();
|
||||
@@ -68,6 +69,7 @@ class pts_result_file
|
||||
$this->internal_tags = self::clean_input($xml->Generated->InternalTags);
|
||||
$this->reference_id = self::clean_input($xml->Generated->ReferenceID);
|
||||
$this->preset_environment_variables = self::clean_input($xml->Generated->PreSetEnvironmentVariables);
|
||||
$this->last_modified = $xml->Generated->LastModified;
|
||||
}
|
||||
|
||||
if(isset($xml->System))
|
||||
@@ -83,6 +85,11 @@ class pts_result_file
|
||||
{
|
||||
foreach($xml->Result as $result)
|
||||
{
|
||||
if($parse_only_qualified_result_objects && ($result->Identifier == null || $result->Identifier->__toString() == null))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$test_profile = new pts_test_profile(($result->Identifier != null ? $result->Identifier->__toString() : null), null, !$read_only_result_objects);
|
||||
$test_profile->set_test_title($result->Title->__toString());
|
||||
$test_profile->set_version($result->AppVersion->__toString());
|
||||
@@ -110,6 +117,10 @@ class pts_result_file
|
||||
{
|
||||
return $this->file_location;
|
||||
}
|
||||
public function get_last_modified()
|
||||
{
|
||||
return $this->last_modified;
|
||||
}
|
||||
public function validate()
|
||||
{
|
||||
$dom = new DOMDocument();
|
||||
@@ -206,8 +217,7 @@ class pts_result_file
|
||||
}
|
||||
public function get_system_count()
|
||||
{
|
||||
// XXX this is deprecated
|
||||
return count($this->get_systems());
|
||||
return count($this->systems);
|
||||
}
|
||||
public function set_title($new_title)
|
||||
{
|
||||
@@ -422,7 +432,7 @@ class pts_result_file
|
||||
{
|
||||
return isset($this->result_objects[$ch]) ? $this->result_objects[$ch] : false;
|
||||
}
|
||||
public function get_result_objects($select_indexes = -1, $read_only_objects = false)
|
||||
public function get_result_objects($select_indexes = -1)
|
||||
{
|
||||
if($select_indexes != -1 && $select_indexes !== null)
|
||||
{
|
||||
@@ -548,7 +558,7 @@ class pts_result_file
|
||||
$result->test_result_buffer->remove($remove);
|
||||
}
|
||||
}
|
||||
public function add_to_result_file(&$result_file)
|
||||
public function add_to_result_file(&$result_file, $only_merge_results_already_present = false)
|
||||
{
|
||||
foreach($result_file->get_systems() as $s)
|
||||
{
|
||||
@@ -560,10 +570,15 @@ class pts_result_file
|
||||
|
||||
foreach($result_file->get_result_objects() as $result)
|
||||
{
|
||||
$this->add_result($result);
|
||||
$this->add_result($result, $only_merge_results_already_present);
|
||||
}
|
||||
}
|
||||
public function add_result(&$result_object)
|
||||
public function result_hash_exists(&$result_object)
|
||||
{
|
||||
$ch = $result_object->get_comparison_hash(true, false);
|
||||
return isset($this->result_objects[$ch]) && isset($this->result_objects[$ch]->test_result_buffer);
|
||||
}
|
||||
public function add_result(&$result_object, $only_if_result_already_present = false)
|
||||
{
|
||||
$ch = $result_object->get_comparison_hash(true, false);
|
||||
if(isset($this->result_objects[$ch]) && isset($this->result_objects[$ch]->test_result_buffer))
|
||||
@@ -578,13 +593,18 @@ class pts_result_file
|
||||
$this->result_objects[$ch]->test_result_buffer->add_buffer_item($bi);
|
||||
}
|
||||
}
|
||||
else
|
||||
else if($only_if_result_already_present == false)
|
||||
{
|
||||
$this->result_objects[$ch] = $result_object;
|
||||
}
|
||||
|
||||
return $ch;
|
||||
}
|
||||
public function add_result_return_object(&$result_object, $only_if_result_already_present = false)
|
||||
{
|
||||
$ch = $this->add_result($result_object, $only_if_result_already_present);
|
||||
return isset($this->result_objects[$ch]) ? $this->result_objects[$ch] : false;
|
||||
}
|
||||
public function get_xml($to = null, $force_nice_formatting = false)
|
||||
{
|
||||
$xml_writer = new nye_XmlWriter(null, $force_nice_formatting);
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2010 - 2016, Phoronix Media
|
||||
Copyright (C) 2010 - 2016, Michael Larabel
|
||||
Copyright (C) 2010 - 2019, Phoronix Media
|
||||
Copyright (C) 2010 - 2019, 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
|
||||
@@ -22,6 +22,293 @@
|
||||
|
||||
class pts_result_file_analyzer
|
||||
{
|
||||
public static function generate_geometric_mean_result($result_file)
|
||||
{
|
||||
$results = array();
|
||||
$system_count = $result_file->get_system_count();
|
||||
foreach($result_file->get_result_objects() as $result)
|
||||
{
|
||||
if($result->test_profile->get_identifier() == null || $result->test_profile->get_display_format() != 'BAR_GRAPH' || $system_count > $result->test_result_buffer->get_count())
|
||||
{
|
||||
// Skip data where it's not a proper test, not a singular data value, or not all systems ran within the result file
|
||||
continue;
|
||||
}
|
||||
|
||||
foreach($result->test_result_buffer->get_buffer_items() as $buffer_item)
|
||||
{
|
||||
$r = $buffer_item->get_result_value();
|
||||
if($result->test_profile->get_result_proportion() == 'LIB')
|
||||
{
|
||||
// convert to HIB
|
||||
$r = (1 / $r) * 100;
|
||||
}
|
||||
|
||||
$ri = $buffer_item->get_result_identifier();
|
||||
|
||||
if(!isset($results[$ri]))
|
||||
{
|
||||
$results[$ri] = array();
|
||||
}
|
||||
$results[$ri][] = $r;
|
||||
}
|
||||
}
|
||||
|
||||
foreach($results as $identifier => $values)
|
||||
{
|
||||
if(count($values) < 4)
|
||||
{
|
||||
// If small result file with not a lot of data, don't bother showing...
|
||||
unset($results[$identifier]);
|
||||
}
|
||||
}
|
||||
|
||||
if(!empty($results))
|
||||
{
|
||||
$test_profile = new pts_test_profile();
|
||||
$test_result = new pts_test_result($test_profile);
|
||||
$test_result->test_profile->set_test_title('Geometric Mean Of All Test Results');
|
||||
$test_result->test_profile->set_identifier(null);
|
||||
$test_result->test_profile->set_version(null);
|
||||
$test_result->test_profile->set_result_proportion(null);
|
||||
$test_result->test_profile->set_display_format('BAR_GRAPH');
|
||||
$test_result->test_profile->set_result_scale('Geometric Mean');
|
||||
$test_result->test_profile->set_result_proportion('HIB');
|
||||
$test_result->set_used_arguments_description('Result Composite');
|
||||
$test_result->set_used_arguments('Geometric-Mean');
|
||||
$test_result->test_result_buffer = new pts_test_result_buffer();
|
||||
foreach($results as $identifier => $values)
|
||||
{
|
||||
$values = pts_math::geometric_mean($values);
|
||||
$test_result->test_result_buffer->add_test_result($identifier, pts_math::set_precision($values, 3));
|
||||
}
|
||||
$test_result->sort_results_by_performance();
|
||||
$test_result->test_result_buffer->buffer_values_reverse();
|
||||
return $test_result;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
public static function generate_harmonic_mean_result($result_file)
|
||||
{
|
||||
$results = array();
|
||||
$system_count = $result_file->get_system_count();
|
||||
foreach($result_file->get_result_objects() as $result)
|
||||
{
|
||||
if($result->test_profile->get_identifier() == null || $result->test_profile->get_display_format() != 'BAR_GRAPH' || $result->test_profile->get_result_proportion() == 'LIB' || $system_count > $result->test_result_buffer->get_count())
|
||||
{
|
||||
// Skip data where it's not a proper test, not a singular data value, or not all systems ran within the result file, or lower is better for results
|
||||
continue;
|
||||
}
|
||||
$rs = $result->test_profile->get_result_scale();
|
||||
if(strpos($rs, '/') === false && stripos($rs, ' per ') === false && stripos($rs, 'FPS') === false && stripos($rs, 'bps') === false && stripos($rs, 'iops') === false)
|
||||
{
|
||||
// Harmonic mean is relevant for tests of rates, MB/s, FPS, ns/day, etc.
|
||||
continue;
|
||||
}
|
||||
foreach($result->test_result_buffer->get_buffer_items() as $buffer_item)
|
||||
{
|
||||
$ri = $buffer_item->get_result_identifier();
|
||||
|
||||
if(!isset($results[$rs][$ri]))
|
||||
{
|
||||
$results[$rs][$ri] = array();
|
||||
}
|
||||
$results[$rs][$ri][] = $buffer_item->get_result_value();
|
||||
}
|
||||
}
|
||||
|
||||
foreach($results as $result_scale => $group)
|
||||
{
|
||||
foreach($group as $identifier => $values)
|
||||
{
|
||||
if(count($values) < 4)
|
||||
{
|
||||
// If small result file with not a lot of data, don't bother showing...
|
||||
unset($results[$result_scale][$identifier]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!empty($results))
|
||||
{
|
||||
$test_results = array();
|
||||
foreach($results as $result_scale => $group)
|
||||
{
|
||||
$parsed = array();
|
||||
foreach($group as $identifier => $values)
|
||||
{
|
||||
$parsed[$identifier] = pts_math::harmonic_mean($values);
|
||||
}
|
||||
if(empty($parsed) || count($parsed) < 2)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$test_profile = new pts_test_profile();
|
||||
$test_result = new pts_test_result($test_profile);
|
||||
$test_result->test_profile->set_test_title('Harmonic Mean Of ' . $result_scale . ' Test Results');
|
||||
$test_result->test_profile->set_identifier(null);
|
||||
$test_result->test_profile->set_version(null);
|
||||
$test_result->test_profile->set_result_proportion(null);
|
||||
$test_result->test_profile->set_display_format('BAR_GRAPH');
|
||||
$test_result->test_profile->set_result_scale($result_scale);
|
||||
$test_result->test_profile->set_result_proportion('HIB');
|
||||
$test_result->set_used_arguments_description('Harmonic Mean');
|
||||
$test_result->set_used_arguments('Harmonic-Mean - ' . $result_scale);
|
||||
$test_result->test_result_buffer = new pts_test_result_buffer();
|
||||
foreach($parsed as $identifier => $values)
|
||||
{
|
||||
$test_result->test_result_buffer->add_test_result($identifier, pts_math::set_precision($values, 3));
|
||||
}
|
||||
$test_result->sort_results_by_performance();
|
||||
$test_result->test_result_buffer->buffer_values_reverse();
|
||||
$test_results[] = $test_result;
|
||||
}
|
||||
return $test_results;
|
||||
}
|
||||
|
||||
return array();
|
||||
}
|
||||
public static function display_result_file_stats_pythagorean_means($result_file, $highlight_identifier = null)
|
||||
{
|
||||
$ret = null;
|
||||
$geometric_mean = pts_result_file_analyzer::generate_geometric_mean_result($result_file);
|
||||
if($geometric_mean)
|
||||
{
|
||||
$ret .= pts_result_file_output::test_result_to_text($geometric_mean, pts_client::terminal_width(), true, $highlight_identifier, true);
|
||||
}
|
||||
foreach(pts_result_file_analyzer::generate_harmonic_mean_result($result_file) as $harmonic_mean_result)
|
||||
{
|
||||
$ret .= PHP_EOL . pts_result_file_output::test_result_to_text($harmonic_mean_result, pts_client::terminal_width(), true, $highlight_identifier, true);
|
||||
}
|
||||
$ret .= PHP_EOL;
|
||||
|
||||
return $ret;
|
||||
}
|
||||
public static function display_results_wins_losses($result_file, $highlight_result_identifier = null, $prepend_lines = ' ')
|
||||
{
|
||||
$output = null;
|
||||
$result_file_identifiers_count = $result_file->get_system_count();
|
||||
$wins = array();
|
||||
$losses = array();
|
||||
$tests_counted = 0;
|
||||
|
||||
$possible_evaluate_result_count = 0;
|
||||
foreach($result_file->get_result_objects() as $result)
|
||||
{
|
||||
if($result->test_profile->get_identifier() == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
$possible_evaluate_result_count++;
|
||||
if($result->test_result_buffer->get_count() < 2 || $result->test_result_buffer->get_count() < floor($result_file_identifiers_count / 2))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$tests_counted++;
|
||||
$winner = $result->get_result_first();
|
||||
$loser = $result->get_result_last();
|
||||
|
||||
if(!isset($wins[$winner]))
|
||||
{
|
||||
$wins[$winner] = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
$wins[$winner]++;
|
||||
}
|
||||
|
||||
if(!isset($losses[$loser]))
|
||||
{
|
||||
$losses[$loser] = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
$losses[$loser]++;
|
||||
}
|
||||
}
|
||||
|
||||
if(empty($wins) || empty($losses))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
arsort($wins);
|
||||
arsort($losses);
|
||||
|
||||
$table = array();
|
||||
$table[] = array(pts_client::cli_colored_text('WINS:', 'green', true), '', '');
|
||||
$highlight_row = -1;
|
||||
foreach($wins as $identifier => $count)
|
||||
{
|
||||
$table[] = array($identifier . ': ', $count . ' ', ' [' . pts_math::set_precision($count / $tests_counted * 100, 1) . '%]');
|
||||
|
||||
if($highlight_result_identifier && $highlight_result_identifier == $identifier)
|
||||
{
|
||||
$highlight_row = count($table) - 1;
|
||||
}
|
||||
}
|
||||
$table[] = array('', '', '');
|
||||
$table[] = array(pts_client::cli_colored_text('LOSSES: ', 'red', true), '', '');
|
||||
$highlight_row = -1;
|
||||
foreach($losses as $identifier => $count)
|
||||
{
|
||||
$table[] = array($identifier . ': ', $count, ' [' . pts_math::set_precision($count / $tests_counted * 100, 1) . '%]');
|
||||
|
||||
if($highlight_result_identifier && $highlight_result_identifier == $identifier)
|
||||
{
|
||||
$highlight_row = count($table) - 1;
|
||||
}
|
||||
}
|
||||
$output .= pts_user_io::display_text_table($table, $prepend_lines, 0, 0, false, $highlight_row) . PHP_EOL;
|
||||
$output .= $prepend_lines . pts_client::cli_colored_text('TESTS COUNTED: ', 'cyan', true) . ($tests_counted == $possible_evaluate_result_count ? $tests_counted : $tests_counted . ' of ' . $possible_evaluate_result_count) . PHP_EOL;
|
||||
return $output;
|
||||
}
|
||||
public static function display_results_baseline_two_way_compare($result_file, $drop_flat_results = false, $border_table = false, $rich_text = false, $prepend_to_lines = null)
|
||||
{
|
||||
$table = array(array('Test', 'Configuration', 'Relative'));
|
||||
$color_rows = array();
|
||||
|
||||
foreach($result_file->get_result_objects() as $ro)
|
||||
{
|
||||
if($ro->test_profile->get_display_format() != 'BAR_GRAPH')
|
||||
{
|
||||
continue;
|
||||
}
|
||||
$analyze_ro = clone $ro;
|
||||
if($drop_flat_results)
|
||||
{
|
||||
$analyze_ro->remove_unchanged_results(0.3);
|
||||
}
|
||||
|
||||
$buffer_identifiers = $analyze_ro->test_result_buffer->get_identifiers();
|
||||
if(count($buffer_identifiers) != 2)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$analyze_ro->normalize_buffer_values(pts_arrays::first_element($buffer_identifiers));
|
||||
$result = $analyze_ro->test_result_buffer->get_value_from_identifier(pts_arrays::last_element($buffer_identifiers));
|
||||
if(empty($result))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
$result = round($result, 3);
|
||||
if($drop_flat_results && $result == 1)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if($rich_text && ($result < 0.97 || $result > 1.03))
|
||||
{
|
||||
$color_rows[count($table)] = $result < 1 ? 'red' : 'green';
|
||||
}
|
||||
$table[] = array($analyze_ro->test_profile->get_identifier_base_name(), $analyze_ro->get_arguments_description_shortened(), $result);
|
||||
}
|
||||
|
||||
$bold_row = $rich_text ? 0 : -1;
|
||||
return count($table) < 2 ? null : PHP_EOL . pts_user_io::display_text_table($table, $prepend_to_lines, 0, 0, $border_table, $bold_row, $color_rows);
|
||||
}
|
||||
public static function analyze_result_file_intent(&$result_file, &$flagged_results = -1, $return_all_changed_indexes = false)
|
||||
{
|
||||
$identifiers = array();
|
||||
@@ -101,7 +388,7 @@ class pts_result_file_analyzer
|
||||
pts_result_file_analyzer::compact_result_table_data($data, $identifiers, true);
|
||||
$desc = pts_result_file_analyzer::analyze_system_component_changes($data, $rows, array(
|
||||
array('Memory', 'Graphics', 'Display Driver', 'OpenGL'),
|
||||
array('Graphics', 'Display Driver', 'OpenGL', 'Vulkan'), array('Graphics', 'Display Driver', 'OpenGL', 'OpenCL', 'Vulkan'), array('Graphics', 'Display Driver', 'OpenCL'), array('Graphics', 'Monitor', 'Kernel', 'Display Driver', 'OpenGL'), array('Graphics', 'Monitor', 'Display Driver', 'OpenGL'), array('Graphics', 'Kernel', 'Display Driver', 'OpenGL'), array('Graphics', 'Display Driver', 'OpenGL'), array('Graphics', 'OpenGL'), array('Graphics', 'Kernel'), array('Graphics', 'Display Driver') // All potential graphics comparisons
|
||||
array('Graphics', 'Display Driver', 'OpenGL', 'Vulkan'), array('Graphics', 'Kernel', 'Display Driver', 'OpenGL', 'Vulkan'), array('Graphics', 'Display Driver', 'OpenGL', 'OpenCL', 'Vulkan'), array('Graphics', 'Display Driver', 'OpenCL'), array('Graphics', 'Monitor', 'Kernel', 'Display Driver', 'OpenGL'), array('Graphics', 'Monitor', 'Display Driver', 'OpenGL'), array('Graphics', 'Kernel', 'Display Driver', 'OpenGL'), array('Graphics', 'Display Driver', 'OpenGL'), array('Graphics', 'OpenGL'), array('Graphics', 'Kernel'), array('Graphics', 'Display Driver') // All potential graphics comparisons
|
||||
), $return_all_changed_indexes);
|
||||
}
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2010 - 2018, Phoronix Media
|
||||
Copyright (C) 2010 - 2018, Michael Larabel
|
||||
Copyright (C) 2010 - 2019, Phoronix Media
|
||||
Copyright (C) 2010 - 2019, 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
|
||||
@@ -125,7 +125,7 @@ class pts_result_file_output
|
||||
|
||||
return $csv_output;
|
||||
}
|
||||
public static function result_file_to_text(&$result_file, $terminal_width = 80)
|
||||
public static function result_file_to_text(&$result_file, $terminal_width = 80, $stylize_output = false)
|
||||
{
|
||||
$result_output = null;
|
||||
|
||||
@@ -150,40 +150,53 @@ class pts_result_file_output
|
||||
|
||||
foreach($result_file->get_result_objects() as $result_object)
|
||||
{
|
||||
$result_output .= trim($result_object->test_profile->get_title() . ' ' . $result_object->test_profile->get_app_version() . PHP_EOL . $result_object->get_arguments_description());
|
||||
$result_output .= self::test_result_to_text($result_object, $terminal_width);
|
||||
$result_output .= self::test_result_to_text($result_object, $terminal_width, $stylize_output, null, true, true);
|
||||
$result_output .= PHP_EOL . PHP_EOL;
|
||||
}
|
||||
|
||||
return $result_output;
|
||||
}
|
||||
public static function test_result_to_text(&$result_object, $terminal_width = 80, $color_output = false, $highlight_result = null)
|
||||
public static function test_result_to_text($result_object, $terminal_width = 80, $stylize_output = false, $highlight_result = null, $show_title = true, $always_force_title = false)
|
||||
{
|
||||
$result_output = null;
|
||||
|
||||
static $last_title_shown = null;
|
||||
if($show_title)
|
||||
{
|
||||
if($always_force_title || $last_title_shown != $result_object->test_profile->get_title())
|
||||
{
|
||||
$result_output .= PHP_EOL . ' ' . trim($result_object->test_profile->get_title() . ' ' . $result_object->test_profile->get_app_version());
|
||||
$last_title_shown = $result_object->test_profile->get_title();
|
||||
}
|
||||
$result_output .= PHP_EOL . ' ' . $result_object->get_arguments_description();
|
||||
}
|
||||
if($result_object->test_profile->get_result_scale() != null)
|
||||
{
|
||||
$result_output .= PHP_EOL . ' ' . $result_object->test_profile->get_result_scale();
|
||||
$scale_line = ' ' . $result_object->test_profile->get_result_scale();
|
||||
if($result_object->test_profile->get_result_proportion() == 'LIB')
|
||||
{
|
||||
$result_output .= ' < Lower Is Better';
|
||||
$scale_line .= ' < Lower Is Better';
|
||||
}
|
||||
else if($result_object->test_profile->get_result_proportion() == 'HIB')
|
||||
{
|
||||
$result_output .= ' > Higher Is Better';
|
||||
$scale_line .= ' > Higher Is Better';
|
||||
}
|
||||
|
||||
$result_output .= PHP_EOL . ($stylize_output && PTS_IS_CLIENT ? pts_client::cli_just_italic($scale_line) : $scale_line);
|
||||
}
|
||||
|
||||
$identifiers = $result_object->test_result_buffer->get_identifiers();
|
||||
$longest_identifier_length = strlen(pts_strings::find_longest_string($identifiers)) + 2;
|
||||
$longest_identifier_length = strlen(pts_strings::find_longest_string($identifiers)) + 1;
|
||||
|
||||
$result_object->test_result_buffer->adjust_precision();
|
||||
$is_line_graph = false;
|
||||
foreach($result_object->test_result_buffer as &$buffers)
|
||||
{
|
||||
if(empty($buffers))
|
||||
continue;
|
||||
|
||||
$max_value = 0;
|
||||
$min_value = pts_arrays::first_element($buffers)->get_result_value();
|
||||
$min_value = -1;
|
||||
$largest_min_value = 0;
|
||||
$longest_result = 0;
|
||||
foreach($buffers as &$buffer_item)
|
||||
{
|
||||
@@ -193,7 +206,15 @@ class pts_result_file_output
|
||||
$longest_result = strlen($v);
|
||||
}
|
||||
|
||||
if($v > $max_value)
|
||||
if(stripos($v, ',') !== false)
|
||||
{
|
||||
$v = explode(',', $v);
|
||||
$max_value = max($max_value, max($v) * 1.03);
|
||||
$min_value = $min_value == -1 ? min($v) : min($min_value, min($v));
|
||||
$largest_min_value = max($largest_min_value, min($v));
|
||||
$is_line_graph = true;
|
||||
}
|
||||
else if($v > $max_value)
|
||||
{
|
||||
$max_value = $v;
|
||||
}
|
||||
@@ -203,39 +224,139 @@ class pts_result_file_output
|
||||
}
|
||||
}
|
||||
|
||||
// First run through the items to see if it makes sense applying colors (e.g. multiple matches)
|
||||
$buffer_count = 0;
|
||||
foreach($buffers as &$buffer_item)
|
||||
{
|
||||
$brand_color = pts_render::identifier_to_brand_color($buffer_item->get_result_identifier(), null);
|
||||
if($brand_color != null)
|
||||
{
|
||||
// Quite simple handling, could do better
|
||||
$buffer_count++;
|
||||
}
|
||||
}
|
||||
$do_color = $buffer_count > 1 ? true : false;
|
||||
|
||||
$longest_result++;
|
||||
$precision = ($max_value > 100 || ($min_value > 29 && $max_value > 79) ? 0 : 1);
|
||||
if($is_line_graph)
|
||||
{
|
||||
$largest_min_value = pts_math::set_precision($largest_min_value, $precision);
|
||||
$min_value = pts_math::set_precision($min_value, $precision);
|
||||
$largest_min_length = strlen($largest_min_value);
|
||||
$max_value_length = strlen(pts_math::set_precision($max_value, $precision));
|
||||
}
|
||||
foreach($buffers as &$buffer_item)
|
||||
{
|
||||
$val = $buffer_item->get_result_value();
|
||||
|
||||
if(stripos($val, ',') !== false)
|
||||
{
|
||||
$vals = explode(',', $val);
|
||||
$val = 'MIN: ' . min($vals) . ' / AVG: ' . round(array_sum($vals) / count($vals), 2) . ' / MAX: ' . max($vals);
|
||||
}
|
||||
|
||||
$result_line = ' ' . $buffer_item->get_result_identifier() . ' ';
|
||||
$result_length_offset = $longest_identifier_length - strlen($buffer_item->get_result_identifier());
|
||||
if($result_length_offset > 0)
|
||||
{
|
||||
$result_line .= str_repeat('.', $result_length_offset) . ' ';
|
||||
}
|
||||
$result_line .= $val;
|
||||
|
||||
if(is_numeric($val))
|
||||
if($is_line_graph)
|
||||
{
|
||||
// LINE GRAPH
|
||||
$values = explode(',', $val);
|
||||
$formatted_min = pts_math::set_precision(min($values), $precision);
|
||||
$formatted_avg = pts_math::set_precision(array_sum($values) / count($values), $precision);
|
||||
$min_value_offset = $largest_min_length - strlen($formatted_min);
|
||||
$min_value_offset = $min_value_offset > 0 ? str_repeat(' ', $min_value_offset) : null;
|
||||
$avg_value_offset = $max_value_length - strlen($formatted_avg);
|
||||
$avg_value_offset = $avg_value_offset > 0 ? str_repeat(' ', $avg_value_offset) : null;
|
||||
$result_line .= 'MIN: ' . $formatted_min . $min_value_offset . ' AVG: ' . $formatted_avg . $avg_value_offset . ' MAX: ' . pts_math::set_precision(max($values), $precision) . ' ';
|
||||
|
||||
if($terminal_width > (strlen($result_line) * 2) && $buffer_count > 1)
|
||||
{
|
||||
$box_plot = str_repeat(' ', ($terminal_width - strlen($result_line)));
|
||||
$box_plot_size = strlen($box_plot);
|
||||
$box_plot = str_split($box_plot);
|
||||
|
||||
// BOX PLOT
|
||||
$whisker_bottom = pts_math::find_percentile($values, 0.02);
|
||||
$whisker_top = pts_math::find_percentile($values, 0.98);
|
||||
$unique_values = array_unique($values);
|
||||
foreach($unique_values as &$val)
|
||||
{
|
||||
if(($val < $whisker_bottom || $val > $whisker_top) && $val > 0.1)
|
||||
{
|
||||
$x = floor($val / $max_value * $box_plot_size);
|
||||
if(isset($box_plot[$x]))
|
||||
$box_plot[$x] = '.';
|
||||
}
|
||||
}
|
||||
$whisker_start_char = round($whisker_bottom / $max_value * $box_plot_size);
|
||||
$whisker_end_char = round($whisker_top / $max_value * $box_plot_size);
|
||||
|
||||
for($i = $whisker_start_char; $i <= $whisker_end_char && $i < ($box_plot_size - 1); $i++)
|
||||
{
|
||||
$box_plot[$i] = '-';
|
||||
}
|
||||
|
||||
$box_left = round((pts_math::find_percentile($values, 0.25) / $max_value) * $box_plot_size);
|
||||
$box_middle = round((pts_math::find_percentile($values, 0.5) / $max_value) * $box_plot_size);
|
||||
$box_right = round((pts_math::find_percentile($values, 0.75) / $max_value) * $box_plot_size);
|
||||
for($i = $box_left; $i <= $box_right; $i++)
|
||||
{
|
||||
$box_plot[$i] = '#';
|
||||
}
|
||||
$box_plot[$whisker_start_char] = '|';
|
||||
$box_plot[$whisker_end_char] = '|';
|
||||
$box_plot[$box_middle] = 'X';
|
||||
|
||||
// END OF BOX PLOT
|
||||
//$box_plot[0] = '[';
|
||||
//$box_plot[($box_plot_size - 1)] = ']';
|
||||
$result_line .= substr(implode('', $box_plot), 0, $box_plot_size);
|
||||
}
|
||||
}
|
||||
else if(is_numeric($val))
|
||||
{
|
||||
// STANDARD NUMERIC RESULT
|
||||
$result_line .= $val;
|
||||
$repeat_length = $longest_result - strlen($val);
|
||||
$result_line .= ($repeat_length >= 0 ? str_repeat(' ', $repeat_length) : null) . '|';
|
||||
$current_line_length = strlen($result_line);
|
||||
$result_line .= str_repeat('=', round(($val / $max_value) * ($terminal_width - $current_line_length)));
|
||||
}
|
||||
|
||||
if($color_output && PTS_IS_CLIENT)
|
||||
if($stylize_output && PTS_IS_CLIENT)
|
||||
{
|
||||
$do_bold = false;
|
||||
// See if should bold the line
|
||||
if($highlight_result == $buffer_item->get_result_identifier())
|
||||
$result_line = pts_client::cli_just_bold($result_line);
|
||||
{
|
||||
$do_bold = true;
|
||||
}
|
||||
else if(is_array($highlight_result) && in_array($buffer_item->get_result_identifier(), $highlight_result))
|
||||
{
|
||||
$do_bold = true;
|
||||
}
|
||||
|
||||
// Determine if color
|
||||
if($do_color)
|
||||
{
|
||||
$brand_color = pts_render::identifier_to_brand_color($buffer_item->get_result_identifier(), null);
|
||||
if($brand_color != null)
|
||||
{
|
||||
$brand_color = pts_client::hex_color_to_string($brand_color);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$brand_color = false;
|
||||
}
|
||||
|
||||
if($brand_color)
|
||||
{
|
||||
$result_line = pts_client::cli_colored_text($result_line, $brand_color, $do_bold);
|
||||
}
|
||||
else if($do_bold)
|
||||
{
|
||||
$result_line = pts_client::cli_just_bold($result_line);
|
||||
}
|
||||
}
|
||||
|
||||
$result_output .= PHP_EOL . $result_line;
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2010 - 2018, Phoronix Media
|
||||
Copyright (C) 2010 - 2018, Michael Larabel
|
||||
Copyright (C) 2010 - 2019, Phoronix Media
|
||||
Copyright (C) 2010 - 2019, 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
|
||||
@@ -86,7 +86,7 @@ class pts_strings
|
||||
{
|
||||
return function_exists('ctype_upper') ? ctype_upper($string) : ($string == strtoupper($string));
|
||||
}
|
||||
public static function trim_search_query($value)
|
||||
public static function trim_search_query($value, $remove_multipliers = false)
|
||||
{
|
||||
$search_break_characters = array('@', '(', '/', '+', '[', '<', '*', '"');
|
||||
for($i = 0, $x = strlen($value); $i < $x; $i++)
|
||||
@@ -104,10 +104,13 @@ class pts_strings
|
||||
}
|
||||
|
||||
// Remove multiplier if prepended to string
|
||||
$multiplier = strpos($value, ' x ');
|
||||
if($multiplier !== false && is_numeric(substr($value, 0, $multiplier)))
|
||||
if($remove_multipliers)
|
||||
{
|
||||
$value = substr($value, ($multiplier + 3));
|
||||
$multiplier = strpos($value, ' x ');
|
||||
if($multiplier !== false && is_numeric(substr($value, 0, $multiplier)))
|
||||
{
|
||||
$value = substr($value, ($multiplier + 3));
|
||||
}
|
||||
}
|
||||
|
||||
$value = str_replace('& ', null, $value);
|
||||
@@ -427,7 +430,7 @@ class pts_strings
|
||||
$str = str_ireplace($original_phrase, $new_phrase, $str);
|
||||
}
|
||||
|
||||
$remove_phrases = array('incorporation', 'corporation', 'corp.', 'invalid', 'technologies', 'technology', ' version', ' project ', 'computer', 'To Be Filled By', 'ODM', 'O.E.M.', 'Desktop Reference Platform', 'small form factor', 'convertible', ' group', 'chipset', 'community', 'reference', 'communications', 'semiconductor', 'processor', 'host bridge', 'adapter', ' CPU', 'platform', 'international', 'express', 'graphics', ' none', 'electronics', 'integrated', 'alternate', 'quad-core', 'memory', 'series', 'network', 'motherboard', 'electric ', 'industrial ', 'serverengines', 'Manufacturer', 'x86/mmx/sse2', '/AGP/SSE/3DNOW!', '/AGP/SSE2', 'controller', '(extreme graphics innovation)', 'pci-e_gfx and ht3 k8 part', 'pci-e_gfx and ht1 k8 part', 'Northbridge only', 'dual slot', 'dual-core', 'dual core', 'microsystems', 'not specified', 'single slot', 'genuine', 'unknown device', 'systemberatung', 'gmbh', 'graphics adapter', 'video device', 'http://', 'www.', '.com', '.tw/', '/pci/sse2/3dnow!', '/pcie/sse2', '/pci/sse2', 'balloon', 'network connection', 'ethernet', 'limited.', ' system', 'compliant', 'co. ltd', 'co.', 'ltd.', 'LTD ', ' LTD', '\AE', '(r)', '(tm)', 'inc.', 'inc', '6.00 PG', ',', '\'', '_ ', '_ ', 'corp', 'product name', 'base board', 'mainboard', 'pci to pci', ' release ', 'nee ', 'default string', ' AG ', '/DRAM');
|
||||
$remove_phrases = array('incorporation', 'corporation', 'corp.', 'invalid', 'technologies', 'technology', ' version', ' project ', 'computer', 'To Be Filled By', 'ODM', 'O.E.M.', 'Desktop Reference Platform', 'small form factor', 'convertible', ' group', 'chipset', 'community', 'reference', 'communications', 'semiconductor', 'processor', 'host bridge', 'adapter', ' CPU', 'platform', 'international', 'express', 'graphics', ' none', 'electronics', 'integrated', 'alternate', 'quad-core', 'memory', 'series', 'network', 'motherboard', 'electric ', 'industrial ', 'serverengines', 'Manufacturer', 'x86/mmx/sse2', '/AGP/SSE/3DNOW!', '/AGP/SSE2', 'controller', '(extreme graphics innovation)', 'pci-e_gfx and ht3 k8 part', 'pci-e_gfx and ht1 k8 part', 'Northbridge only', 'dual slot', 'dual-core', 'dual core', 'microsystems', 'not specified', 'single slot', 'genuine', 'unknown device', 'systemberatung', 'gmbh', 'graphics adapter', 'video device', 'http://', 'www.', '.com', '.tw/', '/pci/sse2/3dnow!', '/pcie/sse2', '/pci/sse2', 'balloon', 'network connection', 'ethernet', 'limited.', ' systems', ' system', 'compliant', 'co. ltd', 'co.', 'ltd.', 'LTD ', ' LTD', '\AE', '(r)', '(tm)', 'inc.', 'inc', '6.00 PG', ',', '\'', '_ ', '_ ', 'corp', 'product name', 'base board', 'mainboard', 'pci to pci', ' release ', 'nee ', 'default string', ' AG ', '/DRAM', 'and subsidiaries', ' SCSI', 'Disk Device', ' ATA', 'Daughter Card', 'Gigabit Connection', 'altivec supported');
|
||||
$str = str_ireplace($remove_phrases, ' ', $str);
|
||||
|
||||
if(($w = stripos($str, 'WARNING')) !== false)
|
||||
@@ -444,6 +447,13 @@ class pts_strings
|
||||
|
||||
// Fixes an AMD string issue like 'FX -4100' due to stripping (TM) from in between characters, possibly other cases too
|
||||
$str = str_replace(' -', '-', $str);
|
||||
$str = str_replace('- ', ' ', $str);
|
||||
|
||||
if(stripos($str, ' + ') === false)
|
||||
{
|
||||
// Remove any duplicate words
|
||||
$str = implode(' ', array_unique(explode(' ', $str)));
|
||||
}
|
||||
|
||||
return $str;
|
||||
}
|
||||
@@ -674,6 +684,27 @@ class pts_strings
|
||||
|
||||
return implode(($standard_version ? ', ' : null), $formatted_time);
|
||||
}
|
||||
public static function number_suffix_handler($n)
|
||||
{
|
||||
$suffix = 'th';
|
||||
$n = $n % 100;
|
||||
if($n < 11 || $n > 13)
|
||||
{
|
||||
switch($n % 10)
|
||||
{
|
||||
case 1:
|
||||
$suffix = 'st';
|
||||
break;
|
||||
case 2:
|
||||
$suffix = 'nd';
|
||||
break;
|
||||
case 3:
|
||||
$suffix = 'rd';
|
||||
break;
|
||||
}
|
||||
}
|
||||
return $n . $suffix;
|
||||
}
|
||||
public static function plural_handler($count, $base)
|
||||
{
|
||||
return $count . ' ' . $base . ($count != 1 ? 's' : null);
|
||||
|
||||
@@ -45,7 +45,7 @@ class pts_test_option
|
||||
}
|
||||
public function set_option_default($default_node)
|
||||
{
|
||||
if($default_node == null)
|
||||
if($default_node == null || $default_node == "0")
|
||||
$default_node = 1;
|
||||
|
||||
$default_node--;
|
||||
|
||||
@@ -334,6 +334,10 @@ class pts_test_profile_parser
|
||||
{
|
||||
return pts_strings::string_bool($this->xg('TestProfile/AutoSaveResults', 'FALSE'));
|
||||
}
|
||||
public function do_remove_test_install_directory_on_reinstall()
|
||||
{
|
||||
return pts_strings::string_bool($this->xg('TestProfile/RemoveInstallDirectoryOnReinstall', 'TRUE'));
|
||||
}
|
||||
public function get_result_quantifier()
|
||||
{
|
||||
return $this->xg('TestInformation/ResultQuantifier');
|
||||
@@ -342,6 +346,18 @@ class pts_test_profile_parser
|
||||
{
|
||||
return pts_strings::string_bool($this->xg('TestProfile/RequiresRoot', 'FALSE'));
|
||||
}
|
||||
public function is_display_required()
|
||||
{
|
||||
return pts_strings::string_bool($this->xg('TestProfile/RequiresDisplay', 'FALSE')) || ($this->xg('TestProfile/RequiresDisplay') == null && $this->get_test_hardware_type() == 'Graphics');
|
||||
}
|
||||
public function is_network_required()
|
||||
{
|
||||
return pts_strings::string_bool($this->xg('TestProfile/RequiresNetwork', 'FALSE')) || $this->get_test_hardware_type() == 'Network';
|
||||
}
|
||||
public function is_internet_required()
|
||||
{
|
||||
return pts_strings::string_bool($this->xg('TestProfile/RequiresInternet', 'FALSE'));
|
||||
}
|
||||
public function allow_cache_share()
|
||||
{
|
||||
return pts_strings::string_bool($this->xg('TestSettings/Default/AllowCacheShare'));
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2008 - 2017, Phoronix Media
|
||||
Copyright (C) 2008 - 2017, Michael Larabel
|
||||
Copyright (C) 2008 - 2019, Phoronix Media
|
||||
Copyright (C) 2008 - 2019, 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
|
||||
@@ -64,6 +64,10 @@ class pts_test_result
|
||||
{
|
||||
$this->used_arguments_description = $arguments_description;
|
||||
}
|
||||
public function remove_from_used_arguments_description($remove_string)
|
||||
{
|
||||
$this->used_arguments_description = str_replace($remove_string, '', $this->used_arguments_description);
|
||||
}
|
||||
public function append_to_arguments_description($arguments_description)
|
||||
{
|
||||
if(strpos(' ' . $this->used_arguments_description . ' ', ' ' . $arguments_description . ' ') === false)
|
||||
@@ -80,7 +84,7 @@ class pts_test_result
|
||||
}
|
||||
}
|
||||
|
||||
$this->used_arguments_description .= ($this->used_arguments_description != null ? ' ' : null) . $arguments_description;
|
||||
$this->used_arguments_description .= ($this->used_arguments_description != null && $arguments_description[0] != ' ' ? ' ' : null) . $arguments_description;
|
||||
}
|
||||
}
|
||||
public function set_result_precision($precision = 2)
|
||||
@@ -103,6 +107,22 @@ class pts_test_result
|
||||
{
|
||||
return $this->used_arguments_description;
|
||||
}
|
||||
public function get_arguments_description_shortened()
|
||||
{
|
||||
$shortened = explode(' - ', $this->used_arguments_description);
|
||||
foreach($shortened as &$part)
|
||||
{
|
||||
if(($x = strpos($part, ': ')) !== false)
|
||||
{
|
||||
$part = substr($part, $x + 2);
|
||||
}
|
||||
if(isset($part[18]) && strpos($part, ' ') != false && function_exists('preg_replace'))
|
||||
{
|
||||
$part = preg_replace('/\b(\w)|./', '$1', $part);
|
||||
}
|
||||
}
|
||||
return implode(' - ', $shortened);
|
||||
}
|
||||
public function get_comparison_hash($show_version_and_attributes = true, $raw_output = true)
|
||||
{
|
||||
if($show_version_and_attributes)
|
||||
|
||||
@@ -371,6 +371,28 @@ class pts_test_result_buffer
|
||||
}
|
||||
}
|
||||
}
|
||||
public function adjust_precision($precision = 'auto')
|
||||
{
|
||||
if($precision == 'auto')
|
||||
{
|
||||
// For very large results, little point in keeping the precision...
|
||||
if($this->get_min_value() >= 100)
|
||||
{
|
||||
$precision = 0;
|
||||
}
|
||||
}
|
||||
if(is_numeric($precision))
|
||||
{
|
||||
foreach($this->buffer_items as &$buffer_item)
|
||||
{
|
||||
if(is_numeric(($val = $buffer_item->get_result_value())))
|
||||
{
|
||||
$buffer_item->reset_result_value(pts_math::set_precision($val, $precision));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
public function get_values()
|
||||
{
|
||||
$values = array();
|
||||
|
||||
@@ -87,6 +87,13 @@ class pts_test_result_buffer_item
|
||||
{
|
||||
$a = $a->get_result_value();
|
||||
$b = $b->get_result_value();
|
||||
if(strpos($a, ',') != false && strpos($b, ',') != false)
|
||||
{
|
||||
$a = explode(',', $a);
|
||||
$b = explode(',', $b);
|
||||
$a = array_sum($a) / count($a);
|
||||
$b = array_sum($b) / count($b);
|
||||
}
|
||||
|
||||
if($a == $b)
|
||||
{
|
||||
|
||||
@@ -304,6 +304,41 @@ class pts_test_result_parser
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'valve-source-frame-times':
|
||||
// Counter-Strike: GO At least
|
||||
$log_file = pts_file_io::file_get_contents($test_log_file);
|
||||
$frame_all_times = array();
|
||||
if(($x = strpos($log_file, 'demo tick,frame start time,frame start delta')) !== false)
|
||||
{
|
||||
$log_file = substr($log_file, $x);
|
||||
foreach(explode(PHP_EOL, $log_file) as $line)
|
||||
{
|
||||
$line = explode(',', $line);
|
||||
if(isset($line[2]) && is_numeric($line[2]) && $line[2] > 0)
|
||||
{
|
||||
$frame_all_times[] = $line[2] * 1000;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'csv-f1-frame-times':
|
||||
// F1 2018
|
||||
$log_file = pts_file_io::file_get_contents($test_log_file);
|
||||
$frame_all_times = array();
|
||||
if(($x = strpos($log_file, 'Frame,Time (ms)')) !== false)
|
||||
{
|
||||
$log_file = substr($log_file, $x);
|
||||
foreach(explode(PHP_EOL, $log_file) as $line)
|
||||
{
|
||||
$line = explode(',', $line);
|
||||
if(isset($line[1]) && is_numeric($line[1]) && $line[1] > 0)
|
||||
{
|
||||
$frame_all_times[] = $line[1];
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'csv-individual-frame-times':
|
||||
// Thrones of Britannia on Linux uses at least this method
|
||||
$log_file = pts_file_io::file_get_contents($test_log_file);
|
||||
@@ -403,7 +438,8 @@ class pts_test_result_parser
|
||||
}
|
||||
|
||||
$definitions = $test_run_request->test_profile->get_results_definition('ResultsParser');
|
||||
foreach($definitions->get_result_parser_definitions() as $entry)
|
||||
$all_parser_entries = $definitions->get_result_parser_definitions();
|
||||
foreach($all_parser_entries as $entry)
|
||||
{
|
||||
$tr = clone $test_run_request;
|
||||
if($entry->get_display_format() != null)
|
||||
@@ -412,16 +448,16 @@ class pts_test_result_parser
|
||||
}
|
||||
$is_pass_fail_test = in_array($tr->test_profile->get_display_format(), array('PASS_FAIL', 'MULTI_PASS_FAIL'));
|
||||
$is_numeric_check = !$is_pass_fail_test;
|
||||
$test_result = self::parse_result_process_entry($tr, $log_file, $pts_test_arguments, $extra_arguments, $prefix, $entry, $is_pass_fail_test, $is_numeric_check);
|
||||
$test_result = self::parse_result_process_entry($tr, $log_file, $pts_test_arguments, $extra_arguments, $prefix, $entry, $is_pass_fail_test, $is_numeric_check, $all_parser_entries);
|
||||
if($test_result != false)
|
||||
{
|
||||
// Result found
|
||||
if($is_numeric_check)
|
||||
{
|
||||
// Check if this test reports a min result value
|
||||
$min_result = self::parse_result_process_entry($tr, $log_file, $pts_test_arguments, $extra_arguments, 'MIN_', $entry, $is_pass_fail_test, $is_numeric_check);
|
||||
$min_result = self::parse_result_process_entry($tr, $log_file, $pts_test_arguments, $extra_arguments, 'MIN_', $entry, $is_pass_fail_test, $is_numeric_check, $all_parser_entries);
|
||||
// Check if this test reports a max result value
|
||||
$max_result = self::parse_result_process_entry($tr, $log_file, $pts_test_arguments, $extra_arguments, 'MAX_', $entry, $is_pass_fail_test, $is_numeric_check);
|
||||
$max_result = self::parse_result_process_entry($tr, $log_file, $pts_test_arguments, $extra_arguments, 'MAX_', $entry, $is_pass_fail_test, $is_numeric_check, $all_parser_entries);
|
||||
}
|
||||
self::gen_result_active_handle($test_run_request, $tr)->add_trial_run_result($test_result, $min_result, $max_result);
|
||||
$produced_result = true;
|
||||
@@ -430,7 +466,7 @@ class pts_test_result_parser
|
||||
|
||||
return $produced_result;
|
||||
}
|
||||
protected static function parse_result_process_entry(&$test_run_request, $log_file, $pts_test_arguments, $extra_arguments, $prefix, &$e, $is_pass_fail_test, $is_numeric_check)
|
||||
protected static function parse_result_process_entry(&$test_run_request, $log_file, $pts_test_arguments, $extra_arguments, $prefix, &$e, $is_pass_fail_test, $is_numeric_check, &$all_parser_entries)
|
||||
{
|
||||
$test_result = false;
|
||||
$match_test_arguments = $e->get_match_to_test_args();
|
||||
@@ -821,6 +857,14 @@ class pts_test_result_parser
|
||||
}
|
||||
if($e->get_append_to_arguments_description() != null)
|
||||
{
|
||||
foreach($all_parser_entries as $parser_entry)
|
||||
{
|
||||
if($parser_entry->get_append_to_arguments_description() != null)
|
||||
{
|
||||
$test_run_request->remove_from_used_arguments_description(' - ' . $parser_entry->get_append_to_arguments_description());
|
||||
}
|
||||
}
|
||||
|
||||
$test_run_request->append_to_arguments_description(' - ' . $e->get_append_to_arguments_description());
|
||||
}
|
||||
}
|
||||
@@ -847,11 +891,11 @@ class pts_test_result_parser
|
||||
{
|
||||
$search_key = $line_hint;
|
||||
}
|
||||
else if($line_before_hint != null && strpos($template, $line_hint) !== false)
|
||||
else if($line_before_hint != null && $line_hint != null && strpos($template, $line_hint) !== false)
|
||||
{
|
||||
$search_key = null; // doesn't really matter what this value is
|
||||
}
|
||||
else if($line_after_hint != null && strpos($template, $line_hint) !== false)
|
||||
else if($line_after_hint != null && $line_hint != null && strpos($template, $line_hint) !== false)
|
||||
{
|
||||
$search_key = null; // doesn't really matter what this value is
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
class pts_test_run_options
|
||||
{
|
||||
public static function prompt_user_options(&$test_profile, $preset_selections = null)
|
||||
public static function prompt_user_options(&$test_profile, $preset_selections = null, $no_prompts = false)
|
||||
{
|
||||
$user_args = array();
|
||||
$text_args = array();
|
||||
@@ -36,6 +36,16 @@ class pts_test_run_options
|
||||
// Multiple preset options can be delimited with the PRESET_OPTIONS environment variable via a semicolon ;
|
||||
$preset_selections = pts_client::parse_value_string_double_identifier($cli_presets_env);
|
||||
}
|
||||
if(($cli_presets_env_values = pts_client::read_env('PRESET_OPTIONS_VALUES')) != false)
|
||||
{
|
||||
// To specify test options externally from an environment variable
|
||||
// i.e. PRESET_OPTIONS_VALUES='stream.run-type=Add' ./phoronix-test-suite benchmark stream
|
||||
// The string format is <test-name>.<test-option-name-from-XML-file>=<test-option-value>
|
||||
// The test-name can either be the short/base name (e.g. stream) or the full identifier (pts/stream) without version postfix
|
||||
// Multiple preset options can be delimited with the PRESET_OPTIONS environment variable via a semicolon ;
|
||||
$preset_selections_values = pts_client::parse_value_string_double_identifier($cli_presets_env_values);
|
||||
}
|
||||
|
||||
|
||||
$identifier_short = $test_profile->get_identifier_base_name();
|
||||
$identifier_full = $test_profile->get_identifier(false);
|
||||
@@ -49,7 +59,23 @@ class pts_test_run_options
|
||||
{
|
||||
$option_identifier = $o->get_identifier();
|
||||
|
||||
if($o->option_count() == 0)
|
||||
if(!empty($preset_selections_values) && isset($preset_selections_values[$identifier_short][$option_identifier]))
|
||||
{
|
||||
$b = explode(',', $preset_selections_values[$identifier_short][$option_identifier]);
|
||||
foreach($b as &$a)
|
||||
{
|
||||
$a = $o->format_option_display_from_input($a);
|
||||
}
|
||||
$text_args[] = $b;
|
||||
|
||||
$b = explode(',', $preset_selections_values[$identifier_short][$option_identifier]);
|
||||
foreach($b as &$a)
|
||||
{
|
||||
$a = $o->format_option_value_from_input($a);
|
||||
}
|
||||
$user_args[] = $b;
|
||||
}
|
||||
else if($o->option_count() == 0)
|
||||
{
|
||||
// User inputs their option as there is nothing to select
|
||||
if(isset($preset_selections[$identifier_short][$option_identifier]))
|
||||
@@ -62,6 +88,10 @@ class pts_test_run_options
|
||||
$value = $preset_selections[$identifier_full][$option_identifier];
|
||||
echo PHP_EOL . ' Using Pre-Set Run Option: ' . $value . PHP_EOL;
|
||||
}
|
||||
else if($no_prompts)
|
||||
{
|
||||
$value = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
echo PHP_EOL . $o->get_name() . PHP_EOL;
|
||||
@@ -84,6 +114,10 @@ class pts_test_run_options
|
||||
$bench_choice = $preset_selections[$identifier_full][$option_identifier];
|
||||
echo PHP_EOL . ' Using Pre-Set Run Option: ' . $bench_choice . PHP_EOL;
|
||||
}
|
||||
else if($no_prompts)
|
||||
{
|
||||
$bench_choice = array_keys($option_names);
|
||||
}
|
||||
else
|
||||
{
|
||||
$option_names = $o->get_all_option_names_with_messages();
|
||||
@@ -350,7 +384,7 @@ class pts_test_run_options
|
||||
|
||||
foreach($all_devices as $i => &$device)
|
||||
{
|
||||
if(is_numeric(substr($device, -1)))
|
||||
if(is_numeric(substr($device, -1)) && strpos($device, '/dev/md') === false)
|
||||
{
|
||||
unset($all_devices[$i]);
|
||||
}
|
||||
|
||||
@@ -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 - 2019, Phoronix Media
|
||||
Copyright (C) 2008 - 2019, 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
|
||||
@@ -105,10 +105,11 @@ class pts_user_io
|
||||
}
|
||||
}
|
||||
}
|
||||
public static function display_text_table(&$table, $prepend_to_lines = null, $extra_width_to_column = 0, $min_width = 0)
|
||||
public static function display_text_table(&$table, $prepend_to_lines = null, $extra_width_to_column = 0, $min_width = 0, $border = false, $bold_row = -1, $color_rows = false)
|
||||
{
|
||||
$column_widths = array();
|
||||
$formatted_table = $prepend_to_lines;
|
||||
$formatted_table = null;
|
||||
$longest_line = 0;
|
||||
|
||||
for($r = 0; $r < count($table); $r++)
|
||||
{
|
||||
@@ -121,22 +122,62 @@ class pts_user_io
|
||||
}
|
||||
}
|
||||
|
||||
for($r = 0, $r_count = count($table); $r < $r_count; $r++)
|
||||
for($r = 0; $r < count($table); $r++)
|
||||
{
|
||||
for($c = 0, $rc_count = count($table[$r]); $c < $rc_count; $c++)
|
||||
$line = null;
|
||||
for($c = 0; $c < count($table[$r]); $c++)
|
||||
{
|
||||
$formatted_table .= $table[$r][$c];
|
||||
|
||||
if(($c + 1) != $rc_count)
|
||||
if($border)
|
||||
{
|
||||
$formatted_table .= str_repeat(' ', (max($min_width, 1 + $extra_width_to_column + $column_widths[$c]) - strlen($table[$r][$c])));
|
||||
$line .= '| ';
|
||||
}
|
||||
|
||||
$line .= $table[$r][$c];
|
||||
|
||||
$m = (max($min_width, 1 + $extra_width_to_column + $column_widths[$c]) - strlen($table[$r][$c]));
|
||||
if($m > 0)
|
||||
{
|
||||
$line .= str_repeat(' ', $m);
|
||||
}
|
||||
}
|
||||
|
||||
if(($r + 1) != $r_count)
|
||||
$line = $prepend_to_lines . $line;
|
||||
if($border)
|
||||
{
|
||||
$formatted_table .= PHP_EOL . $prepend_to_lines;
|
||||
$line = $line . '|';
|
||||
}
|
||||
$longest_line = max($longest_line, strlen($line));
|
||||
if($color_rows && isset($color_rows[$r]))
|
||||
{
|
||||
$line = pts_client::cli_colored_text($line, $color_rows[$r], ($r == $bold_row));
|
||||
}
|
||||
else if($r == $bold_row)
|
||||
{
|
||||
$line = pts_client::cli_just_bold($line);
|
||||
}
|
||||
$formatted_table .= ($r == 0 ? '' : PHP_EOL) . $line;
|
||||
if($r == 0 && $border)
|
||||
{
|
||||
$line = null;
|
||||
for($c = 0; $c < count($table[$r]); $c++)
|
||||
{
|
||||
if($border)
|
||||
{
|
||||
$line .= '| ';
|
||||
}
|
||||
|
||||
//$line .= $table[$r][$c];
|
||||
|
||||
$m = (max($min_width, 1 + $extra_width_to_column + $column_widths[$c]));
|
||||
$line .= str_repeat('-', $m - 1) . ' ';
|
||||
}
|
||||
$formatted_table .= PHP_EOL . $line . '|';
|
||||
}
|
||||
}
|
||||
|
||||
if($border)
|
||||
{
|
||||
$formatted_table = PHP_EOL. PHP_EOL . $formatted_table . PHP_EOL;
|
||||
//$formatted_table = str_repeat('-', $longest_line) . PHP_EOL . $formatted_table . PHP_EOL . str_repeat('-', $longest_line) . PHP_EOL;
|
||||
}
|
||||
|
||||
return $formatted_table;
|
||||
@@ -183,7 +224,7 @@ class pts_user_io
|
||||
case 'n':
|
||||
$answer = false;
|
||||
break;
|
||||
default:
|
||||
case '':
|
||||
$answer = $default;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -659,7 +659,7 @@ class pts_validation
|
||||
//{
|
||||
// $value = $node->get_default_value();
|
||||
//}
|
||||
if(empty($value))
|
||||
if(empty($value) && $value !== '0')
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@@ -756,7 +756,7 @@ class pts_validation
|
||||
$val = 'FALSE';
|
||||
}
|
||||
|
||||
if(!empty($val))
|
||||
if($val !== null)
|
||||
{
|
||||
$value = $val;
|
||||
}
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2008 - 2016, Phoronix Media
|
||||
Copyright (C) 2008 - 2016, Michael Larabel
|
||||
Copyright (C) 2008 - 2019, Phoronix Media
|
||||
Copyright (C) 2008 - 2019, 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
|
||||
@@ -340,7 +340,7 @@ class pts_virtual_test_suite
|
||||
$test_version = array_shift($test['versions']);
|
||||
$test_profile = new pts_test_profile($this->repo . '/' . $test_identifier . '-' . $test_version);
|
||||
|
||||
if($test_profile->get_display_format() != 'BAR_GRAPH' || !in_array($test_profile->get_license(), array('Free', 'Non-Free')))
|
||||
if($test_profile->get_display_format() != 'BAR_GRAPH' || ($this->is_virtual_installed == false && !in_array($test_profile->get_license(), array('Free', 'Non-Free'))))
|
||||
{
|
||||
// Also ignore these tests
|
||||
continue;
|
||||
|
||||
@@ -282,6 +282,39 @@
|
||||
<xs:documentation>RequiresRoot allows a value of TRUE or FALSE if the test requires root/administrator rights for successfully running the test. By default the value is assumed to FALSE. If TRUE, the Phoronix Test Suite will attempt to prompt the user at run-time for their root/sudo password to run the test with elevated permissions if the user is not current root/administrator.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="RequiresDisplay" type="Boolean" minOccurs="0" maxOccurs="1">
|
||||
<xs:annotation>
|
||||
<xs:appinfo>
|
||||
<get>is_display_required</get>
|
||||
<set></set>
|
||||
<default>FALSE</default>
|
||||
<flags>UNCOMMON</flags>
|
||||
</xs:appinfo>
|
||||
<xs:documentation>RequiresDisplay allows a value of TRUE or FALSE if the test requires a display server / monitor to be attached for the test to run, i.e. the test requires the ability to launch a GUI window or similar in order for the test to execute. By default the value is assumed to FALSE unless the TestType is set to 'Graphics' and then it is assumed to be TRUE for GPU tests. If TRUE, the Phoronix Test Suite will skip tests from execution if no display server is believed to be running.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="RequiresNetwork" type="Boolean" minOccurs="0" maxOccurs="1">
|
||||
<xs:annotation>
|
||||
<xs:appinfo>
|
||||
<get>is_network_required</get>
|
||||
<set></set>
|
||||
<default>FALSE</default>
|
||||
<flags>UNCOMMON</flags>
|
||||
</xs:appinfo>
|
||||
<xs:documentation>RequiresNetwork allows a value of TRUE or FALSE if the test requires a working network connection to successfully run the test. By default the value is assumed to FALSE. If TRUE, the Phoronix Test Suite will attempt to prompt the user at run-time if a network connection is needed for the test but the Phoronix Test Suite has networking support disabled or no network connection appears to be working. If the TestType of the test profile is 'Network', this value is assumed to be TRUE.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="RequiresInternet" type="Boolean" minOccurs="0" maxOccurs="1">
|
||||
<xs:annotation>
|
||||
<xs:appinfo>
|
||||
<get>is_internet_required</get>
|
||||
<set></set>
|
||||
<default>FALSE</default>
|
||||
<flags>UNCOMMON</flags>
|
||||
</xs:appinfo>
|
||||
<xs:documentation>RequiresInternet allows a value of TRUE or FALSE if the test requires a working Internet connection to successfully run the test. By default the value is assumed to FALSE. If TRUE, the Phoronix Test Suite will attempt to prompt the user at run-time if an Internet connection is needed for the test but the Phoronix Test Suite has Internet support disabled or no Internet connection appears to be working. RequiresInternet is mainly for test profiles that may be cloning from a Git repository or manually downloading files from within the test install script, outside of the scope of the downloads.xml functionality where caching may be handled and where the Phoronix Test Suite already manages the network/downloading behavior.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="EnvironmentSize" type="PositiveDecimal" minOccurs="0" maxOccurs="1">
|
||||
<xs:annotation>
|
||||
<xs:appinfo>
|
||||
@@ -390,6 +423,17 @@
|
||||
<xs:documentation>Rather than prompting the user whether they would like to save the test results, setting AutoSaveResults to TRUE will force the user to save the test results. This option shouldn't be needed unless the test profile's results are only logical if viewed on a graph.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="RemoveInstallDirectoryOnReinstall" type="Boolean" minOccurs="0" maxOccurs="1">
|
||||
<xs:annotation>
|
||||
<xs:appinfo>
|
||||
<get>do_remove_test_install_directory_on_reinstall</get>
|
||||
<set></set>
|
||||
<default>TRUE</default>
|
||||
<flags>UNCOMMON</flags>
|
||||
</xs:appinfo>
|
||||
<xs:documentation>By default when a test is re-installed, the Phoronix Test Suite will first delete all files within that directory to ensure a clean environment. If the test script can sanely handle an install without deleting the files first, this tag can be used with the FALSE value. This option is primarily useful if having a test that takes a long time to install/build while the test profile setup process can cleanly and gracefully re-install that would shorten that install/build time.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="SystemDependencies" type="xs:string" minOccurs="0" maxOccurs="1">
|
||||
<xs:annotation>
|
||||
<xs:appinfo>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user