Compare commits
364 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2b3c6354b3 | ||
|
|
c184cc6841 | ||
|
|
9f3cc3814b | ||
|
|
e129e1865e | ||
|
|
f668188cbd | ||
|
|
2ba79b3671 | ||
|
|
caab17cd65 | ||
|
|
b11a44932e | ||
|
|
bc217e4c0e | ||
|
|
aa4c7624b7 | ||
|
|
f6bf4378ac | ||
|
|
db6a019dad | ||
|
|
c05f7c8c11 | ||
|
|
9a0069cbe9 | ||
|
|
b87948ce60 | ||
|
|
39e7940ba8 | ||
|
|
f6b4343a5e | ||
|
|
f84784205d | ||
|
|
5b839203e6 | ||
|
|
4be3f1ee00 | ||
|
|
b078a38354 | ||
|
|
1311fa8588 | ||
|
|
969375e06e | ||
|
|
422b06bbb3 | ||
|
|
0a1ac41bd0 | ||
|
|
e9e6b1c974 | ||
|
|
cc97a52c85 | ||
|
|
69d15a9072 | ||
|
|
57a78237d3 | ||
|
|
bc84af9eef | ||
|
|
c03621d572 | ||
|
|
58a2d07acf | ||
|
|
75a1b692ce | ||
|
|
0fa2141e03 | ||
|
|
fd8c29db23 | ||
|
|
3c6a4b8537 | ||
|
|
047ee7be47 | ||
|
|
4557aa8fba | ||
|
|
149c628b38 | ||
|
|
af186ec618 | ||
|
|
381b1a864a | ||
|
|
59e7dbfced | ||
|
|
7950f33663 | ||
|
|
e103fdd836 | ||
|
|
d374da3cf5 | ||
|
|
61d9e0cc8c | ||
|
|
dd94c12c90 | ||
|
|
370354ca23 | ||
|
|
807e55269c | ||
|
|
aae681713b | ||
|
|
1511970f99 | ||
|
|
7367b078f2 | ||
|
|
f408f44dce | ||
|
|
78a5372294 | ||
|
|
24b74c4c5f | ||
|
|
ed1b2bbc7e | ||
|
|
3c444f1c18 | ||
|
|
b4183cc1eb | ||
|
|
57153279ef | ||
|
|
66dae6a931 | ||
|
|
2d9b349907 | ||
|
|
3ffd051e78 | ||
|
|
4c180aa96d | ||
|
|
75633423f6 | ||
|
|
54ba1572d4 | ||
|
|
be9b33dc28 | ||
|
|
cadd0b8ad5 | ||
|
|
9c409c12d4 | ||
|
|
891e6255fe | ||
|
|
e95a9d93a2 | ||
|
|
06a9f3d529 | ||
|
|
ab54542d61 | ||
|
|
1cc351dc07 | ||
|
|
062b9a6bba | ||
|
|
fefd63bed9 | ||
|
|
3b4699aaac | ||
|
|
40466a0847 | ||
|
|
9c1f2f4b65 | ||
|
|
aa89ca4339 | ||
|
|
39fe54abc0 | ||
|
|
5637bf542a | ||
|
|
4d6b97d39a | ||
|
|
892faf7e9d | ||
|
|
b15d3f085e | ||
|
|
0318bb52be | ||
|
|
c2904258f5 | ||
|
|
143c775f2a | ||
|
|
38b36330d9 | ||
|
|
8b797189b1 | ||
|
|
ddf67c08bb | ||
|
|
b2ddf027d0 | ||
|
|
5bfe99d244 | ||
|
|
d751e3cfbf | ||
|
|
43a3aa98f6 | ||
|
|
c9be9e14d2 | ||
|
|
0dad2a25d4 | ||
|
|
86997d281c | ||
|
|
451b258c2d | ||
|
|
399b796330 | ||
|
|
580ffac277 | ||
|
|
31b1f964d2 | ||
|
|
5c064d7b76 | ||
|
|
80813ce7c7 | ||
|
|
8fd370afd6 | ||
|
|
4a74e67ee5 | ||
|
|
a02d0c8c70 | ||
|
|
f8eaa96156 | ||
|
|
2cfb430256 | ||
|
|
6ad454b881 | ||
|
|
9c64945f7f | ||
|
|
af987e6608 | ||
|
|
662360012f | ||
|
|
fe898279bb | ||
|
|
cf86a9b209 | ||
|
|
35a752b10a | ||
|
|
70cbb94301 | ||
|
|
311eca9777 | ||
|
|
bcb3283993 | ||
|
|
d8ec874d6c | ||
|
|
346672145e | ||
|
|
2bce5cdd02 | ||
|
|
28aa93b15c | ||
|
|
322b266b48 | ||
|
|
1a92c4faaa | ||
|
|
0bf2e84eec | ||
|
|
8f4335954c | ||
|
|
a7995738ec | ||
|
|
d5a2587daa | ||
|
|
dde42d8ffc | ||
|
|
40829023c3 | ||
|
|
118cff1799 | ||
|
|
e06e304a24 | ||
|
|
f4f08bd210 | ||
|
|
67b304248c | ||
|
|
6b4d99816a | ||
|
|
ec6c58756f | ||
|
|
3465b95292 | ||
|
|
45259478a4 | ||
|
|
872b071670 | ||
|
|
4b8ef61a4b | ||
|
|
ec8acf9ed9 | ||
|
|
b155c1ea90 | ||
|
|
d7cd61deb1 | ||
|
|
9720bc7e16 | ||
|
|
e283682246 | ||
|
|
580fd6c441 | ||
|
|
9507f952c6 | ||
|
|
8af17a0a6c | ||
|
|
8740216864 | ||
|
|
7f5028f3ce | ||
|
|
631cb56662 | ||
|
|
95b4caa7e2 | ||
|
|
27e9e5a56c | ||
|
|
dfc0b8978a | ||
|
|
90d3fe2783 | ||
|
|
92426aedc5 | ||
|
|
62c9f10ea4 | ||
|
|
07d85ef98e | ||
|
|
a84d3c0e31 | ||
|
|
eb210e506e | ||
|
|
7f232753cd | ||
|
|
e87e83a289 | ||
|
|
6cee52c416 | ||
|
|
a7a38b2fc0 | ||
|
|
8b6a1490bb | ||
|
|
b71fb80c7e | ||
|
|
82672e54d7 | ||
|
|
3981d4a169 | ||
|
|
b82cce0531 | ||
|
|
6d1e06bf51 | ||
|
|
daa583d783 | ||
|
|
dec8a5b346 | ||
|
|
fe67cb459b | ||
|
|
13ea3d230f | ||
|
|
155e21e9ad | ||
|
|
f87a035117 | ||
|
|
2e0ccb9c48 | ||
|
|
74f0c18b40 | ||
|
|
6e9e05e3fa | ||
|
|
e744b886c3 | ||
|
|
4df4c975c3 | ||
|
|
8c60566f5f | ||
|
|
0f5bb82f87 | ||
|
|
4a679bc3a3 | ||
|
|
d4a9c04e96 | ||
|
|
2c8b703a0d | ||
|
|
59948042c2 | ||
|
|
1b1f7f191f | ||
|
|
516b41017a | ||
|
|
0ea2375c87 | ||
|
|
be1a4dec8a | ||
|
|
7aadba1d57 | ||
|
|
7bf6c03113 | ||
|
|
60716494e6 | ||
|
|
51acdc67c7 | ||
|
|
c279b0a3a3 | ||
|
|
bf2e8dcc16 | ||
|
|
791d82ecdf | ||
|
|
ed27e1a36f | ||
|
|
da86cd5046 | ||
|
|
78b7da54ef | ||
|
|
f8f16f3e87 | ||
|
|
6885629cb7 | ||
|
|
024189d25d | ||
|
|
8782fcdaa5 | ||
|
|
5bbf8a8caf | ||
|
|
1d21ea4a53 | ||
|
|
ea890b7b8b | ||
|
|
da2648fec8 | ||
|
|
767e8641e1 | ||
|
|
1658bf1e65 | ||
|
|
5245f152a1 | ||
|
|
3cae6d56a6 | ||
|
|
22e0a1134a | ||
|
|
18f8662c24 | ||
|
|
42b9a5b6fd | ||
|
|
2e57174e46 | ||
|
|
39aef2d526 | ||
|
|
9af4fe7a0e | ||
|
|
894364a09c | ||
|
|
3bbd06d599 | ||
|
|
1907838b35 | ||
|
|
8eda4a5a91 | ||
|
|
712de905a4 | ||
|
|
a1d05a987c | ||
|
|
abbe900f13 | ||
|
|
5a96db3380 | ||
|
|
56ef1a00b6 | ||
|
|
e6f19c8988 | ||
|
|
0d768702e0 | ||
|
|
a45895b0ff | ||
|
|
c1a6dcc851 | ||
|
|
eafc5b7a7f | ||
|
|
1c31a919b6 | ||
|
|
5e02c1202c | ||
|
|
2c9cfa4aa7 | ||
|
|
9b22974ea4 | ||
|
|
bee7eeb30a | ||
|
|
a7a0a85183 | ||
|
|
be6ee9b44e | ||
|
|
98a9f44146 | ||
|
|
9004ab7410 | ||
|
|
43e0657d62 | ||
|
|
639a4739e5 | ||
|
|
5d988fb686 | ||
|
|
602ad4bd8e | ||
|
|
7ea7799327 | ||
|
|
edce918fc2 | ||
|
|
66966c63bd | ||
|
|
4fdbf3e04d | ||
|
|
28689112ef | ||
|
|
bfbd5600bf | ||
|
|
4ba6342b94 | ||
|
|
d72518f471 | ||
|
|
e1340308aa | ||
|
|
e9788b9f35 | ||
|
|
3b65a0329e | ||
|
|
7c02413dc6 | ||
|
|
9a4d519a18 | ||
|
|
218f5cfab0 | ||
|
|
82389c8e6a | ||
|
|
fd26da038a | ||
|
|
0c84dd460c | ||
|
|
05e5b13b17 | ||
|
|
976a1564c2 | ||
|
|
803e11d274 | ||
|
|
4f60331beb | ||
|
|
5219e0a08d | ||
|
|
c166443a11 | ||
|
|
d8d72f6d4e | ||
|
|
4be09f1155 | ||
|
|
c4a82ae8f6 | ||
|
|
a19b10d401 | ||
|
|
5d941004e2 | ||
|
|
c3c47d7829 | ||
|
|
ec013399f0 | ||
|
|
60154761b5 | ||
|
|
afa41dcb8b | ||
|
|
200f25160d | ||
|
|
a21ae0bbc1 | ||
|
|
ffdd31d273 | ||
|
|
460fda86bf | ||
|
|
7607477254 | ||
|
|
1bf2f3239a | ||
|
|
c569da824c | ||
|
|
f3891dc41d | ||
|
|
c5908f1979 | ||
|
|
7b734c9cd9 | ||
|
|
e1d75936de | ||
|
|
7d0b809ea9 | ||
|
|
a71bd2cbf8 | ||
|
|
8941860e9b | ||
|
|
a000c0ef20 | ||
|
|
e4b47aa5a4 | ||
|
|
3b95afe1f0 | ||
|
|
d279629ee4 | ||
|
|
a28727598e | ||
|
|
5f23296e9b | ||
|
|
09e721cfda | ||
|
|
a87b8fbad7 | ||
|
|
2ccaf6eab9 | ||
|
|
5d26bc75ab | ||
|
|
38b813186e | ||
|
|
f66269971b | ||
|
|
b10d6d62bb | ||
|
|
d2f7ef4d59 | ||
|
|
eaac34ce9b | ||
|
|
4f3c6d1046 | ||
|
|
ee17c558b5 | ||
|
|
1adc5604d7 | ||
|
|
c5d6fbe9b7 | ||
|
|
c6170880ed | ||
|
|
bba7a462b7 | ||
|
|
a023c9ffb8 | ||
|
|
98f536a827 | ||
|
|
aec95545da | ||
|
|
e10563d25c | ||
|
|
360b2ea52c | ||
|
|
d7000da52b | ||
|
|
52f97d07fe | ||
|
|
a469cd9b24 | ||
|
|
d3c26130d8 | ||
|
|
b6958aea66 | ||
|
|
cd9f20a553 | ||
|
|
327315004f | ||
|
|
b1cabd5cce | ||
|
|
9cf7ecd68c | ||
|
|
2fd7fd58ca | ||
|
|
1939c50960 | ||
|
|
2d6953fe67 | ||
|
|
7592fd09b1 | ||
|
|
c271719825 | ||
|
|
de63dcd52e | ||
|
|
fbb21fcba7 | ||
|
|
358e0e019e | ||
|
|
6e15b68e82 | ||
|
|
6347c3f982 | ||
|
|
d152ee6166 | ||
|
|
f28d8eff3d | ||
|
|
4049811246 | ||
|
|
7b2446ee52 | ||
|
|
e30f391520 | ||
|
|
32073ad075 | ||
|
|
5b1da20a39 | ||
|
|
01b3030ef8 | ||
|
|
d35d61ed7a | ||
|
|
86ccf1f872 | ||
|
|
7277d957d2 | ||
|
|
3742302f6a | ||
|
|
04e0bb96ed | ||
|
|
6f9e7feb1f | ||
|
|
60ce0b5727 | ||
|
|
c6da014d03 | ||
|
|
dcd5b41ae7 | ||
|
|
bdc952bd0c | ||
|
|
f823d6475f | ||
|
|
3c5e61286b | ||
|
|
63bc93c74c | ||
|
|
f3575e663a | ||
|
|
fefc17b87c | ||
|
|
a26f2f5223 | ||
|
|
81dc40f174 | ||
|
|
283ea3f704 | ||
|
|
97619f5014 |
2
AUTHORS
2
AUTHORS
@@ -1,4 +1,4 @@
|
||||
Copyright 2008 - 2016 by Phoronix Media.
|
||||
Copyright 2008 - 2017 by Phoronix Media.
|
||||
|
||||
Lead Architects:
|
||||
|
||||
|
||||
10
README.md
10
README.md
@@ -1,4 +1,4 @@
|
||||
# Phoronix Test Suite 6.6.1
|
||||
# Phoronix Test Suite 7.4.0
|
||||
http://www.phoronix-test-suite.com/
|
||||
|
||||
The **Phoronix Test Suite** is the most comprehensive testing and benchmarking
|
||||
@@ -76,8 +76,7 @@ mode for non-interactive benchmarking by first running `phoronix-test-suite
|
||||
batch-setup` and then using the `batch-run` sub-command rather than `run`.
|
||||
|
||||
Viewing installed system hardware and software is available via
|
||||
`phoronix-test-suite system-info` or `phoronix-test-suite detailed-system-info`
|
||||
for greater verbosity.
|
||||
`phoronix-test-suite system-info`.
|
||||
|
||||
Facilitating a result comparison from OpenBenchmarking.org can be done by
|
||||
running, for example, `phoronix-test-suite benchmark 1204293-BY-PHORONIX357` if
|
||||
@@ -86,6 +85,7 @@ wishing to compare the results of the
|
||||
|
||||
Additional information is available from the Phoronix Test Suite website
|
||||
<http://www.phoronix-test-suite.com/> and the material bundled within the
|
||||
`phoronix-test-suite/documentation/` directory. A man page is also bundled with
|
||||
the phoronix-test-suite software.
|
||||
`phoronix-test-suite/documentation/` directory or via
|
||||
<http://www.phoronix-test-suite.com/documentation/>. A man page is also bundled
|
||||
with the phoronix-test-suite software.
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ $control_file .= "Section: Utilities\n";
|
||||
$control_file .= "Installed-Size: " . shell_exec("cd /tmp/pts-deb-builder/; du -s | cut -f 1");
|
||||
$control_file .= "Priority: optional\n";
|
||||
$control_file .= "Architecture: all\n";
|
||||
$control_file .= "Depends: php-cli|php5-cli,php5-xml|php-xml\n";
|
||||
$control_file .= "Depends: php-cli|php5-cli,php5-cli|php-xml\n";
|
||||
$control_file .= "Recommends: build-essential, php-gd|php5-gd\n";
|
||||
$control_file .= "Maintainer: Phoronix Media <trondheim-pts@phoronix-test-suite.com>\n";
|
||||
$control_file .= "Description: An Automated, Open-Source Testing Framework\n " . @str_replace("\n", " ", file_get_contents('pts-core/static/short-description.txt')) . "\n";
|
||||
|
||||
@@ -1,116 +0,0 @@
|
||||
# Overview
|
||||
|
||||
[Phoronix Test Suite](http://www.phoronix-test-suite.com/) (PTS) is a comprehensive
|
||||
testing and benchmarking suite.
|
||||
|
||||
This charm requires Juju 1.23 or later and uses [Juju
|
||||
Actions](https://jujucharms.com/docs/latest/authors-charm-actions/) to run the
|
||||
benchmarks.
|
||||
|
||||
|
||||
# Usage
|
||||
|
||||
First bootstrap Juju and then deploy pts:
|
||||
|
||||
juju bootstrap
|
||||
juju deploy pts
|
||||
|
||||
From source:
|
||||
|
||||
cd phoronix-test-suite/deploy/juju
|
||||
juju deploy --repository=. local:trusty/pts
|
||||
|
||||
# Configuration
|
||||
|
||||
juju set pts user-config="`cat /path/to/user-config.xml`"
|
||||
|
||||
# Running benchmarks
|
||||
|
||||
You can list all of the actions available with the following command:
|
||||
|
||||
juju action defined pts
|
||||
|
||||
This charm supports the following benchmarks:
|
||||
|
||||
- `cpu`: CPU centric stress tests
|
||||
- `custom`: Custom stress tests
|
||||
- `io`: IO centric tests.
|
||||
- `memory`: Memory centric stress tets
|
||||
- `smoke`: Smoke test, tests that complete quickly.
|
||||
|
||||
To execute a benchmark you can use a Juju action, in this example we run the cpu
|
||||
stress tests on the first pts unit launched:
|
||||
|
||||
juju action do pts/0 cpu
|
||||
|
||||
or in this case, do a io test on pts unit 3:
|
||||
|
||||
juju action do pts/3 io
|
||||
|
||||
You can also run benchmarks across the entire pts service:
|
||||
```sh
|
||||
juju deploy pts # Deploys one unit
|
||||
juju add-unit -n10 pts # Add 10 more nodes
|
||||
juju action do pts memory # Exec the memory benchmark on all 11 pts nodes
|
||||
```
|
||||
If you want to run custom benchmarks:
|
||||
|
||||
juju action do pts/0 smoke tests='pts/apache pts/nginx'
|
||||
|
||||
# Check on actions
|
||||
|
||||
`juju action status` allows you to see the current status of an action. The benchmark results will be available once the action status has changed to `completed`.
|
||||
|
||||
```
|
||||
juju action status 7707a291-be29-46aa-8d02-2daa8ee24ebf
|
||||
actions:
|
||||
- id: 7707a291-be29-46aa-8d02-2daa8ee24ebf
|
||||
status: running
|
||||
unit: pts/0
|
||||
```
|
||||
|
||||
# Get results
|
||||
|
||||
Once an action has completed, you can fetch the results in yaml or json, in addition to the default *smart* format. The `wait` flag allows you to tell fetch how long to wait for results. This is useful if you want to block while waiting for an action to finish.
|
||||
|
||||
```
|
||||
juju action fetch --wait 0 7707a291-be29-46aa-8d02-2daa8ee24ebf
|
||||
results:
|
||||
results:
|
||||
cachebench-read:
|
||||
units: MB/s
|
||||
value: "1129.95"
|
||||
cachebench-read-modify-write:
|
||||
units: MB/s
|
||||
value: "5158.10"
|
||||
cachebench-write:
|
||||
units: MB/s
|
||||
value: "3601.54"
|
||||
phpbench:
|
||||
units: Score
|
||||
value: "35783"
|
||||
stream-add:
|
||||
units: MB/s
|
||||
value: "13187.50"
|
||||
stream-copy:
|
||||
units: MB/s
|
||||
value: "12179.08"
|
||||
stream-scale:
|
||||
units: MB/s
|
||||
value: "12292.20"
|
||||
stream-triad:
|
||||
units: MB/s
|
||||
value: "13069.26"
|
||||
status: completed
|
||||
timing:
|
||||
completed: 2015-03-23 18:47:32 +0000 UTC
|
||||
enqueued: 2015-03-23 17:51:59 +0000 UTC
|
||||
started: 2015-03-23 17:52:03 +0000 UTC
|
||||
```
|
||||
|
||||
The raw output from pts will be stored on the unit, in timestamped directories under /opt/pts/results.
|
||||
|
||||
# Contact Information
|
||||
|
||||
- Maintainer: Adam Israel <adam.israel@canonical.com>
|
||||
- [Phoronix Test Suite](http://www.phoronix-test-suite.com/) homepage
|
||||
@@ -1,20 +0,0 @@
|
||||
custom:
|
||||
description: "Custom stress tests"
|
||||
params:
|
||||
tests:
|
||||
description: "Which PTS tests to run, space delimited. See README for full list"
|
||||
type: string
|
||||
default: ""
|
||||
smoke:
|
||||
description: Smoke test, tests that complete quickly.
|
||||
params:
|
||||
tests:
|
||||
description: "Memory centric stress tests"
|
||||
type: string
|
||||
default: "pts/phpbench pts/cachebench pts/stream"
|
||||
memory:
|
||||
description: Memory centric stress tets
|
||||
cpu:
|
||||
description: CPU centric stress tests
|
||||
io:
|
||||
description: "IO centric tests."
|
||||
@@ -1,27 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
run_benchmark() {
|
||||
params="$@"
|
||||
|
||||
mkdir -p /opt/pts/results
|
||||
rm -rf /root/.phoronix-test-suite
|
||||
cp -Rpf files/dotfile-phoronix-test-suite /root/.phoronix-test-suite
|
||||
|
||||
run=`date +%s`
|
||||
|
||||
userconfig=`config-get user-config`
|
||||
if [ ! -z "$userconfig" ]; then
|
||||
echo $userconfig > /root/.phoronix-test-suite/user-config.xml
|
||||
fi
|
||||
|
||||
phoronix-test-suite batch-install $params > /dev/null 2>&1
|
||||
|
||||
benchmark-start || true
|
||||
phoronix-test-suite batch-run $params
|
||||
benchmark-finish || true
|
||||
rsync -aqz /root/.phoronix-test-suite /opt/pts/results/$run
|
||||
|
||||
scripts/parse /opt/pts/results/$run/.phoronix-test-suite/test-results/$(date +%Y)-*/test-1.xml
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -eux
|
||||
|
||||
# We're just sourcing the central benchmark, typically people will just put
|
||||
# their benchmarks in one file.
|
||||
|
||||
. actions/benchmark
|
||||
|
||||
params=`action-get tests`
|
||||
run_benchmark $params
|
||||
@@ -1,9 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
# We're just sourcing the central benchmark, typically people will just put
|
||||
# their benchmarks in one file.
|
||||
. actions/benchmark
|
||||
|
||||
run_benchmark pts/ramspeed pts/stream
|
||||
@@ -1 +0,0 @@
|
||||
custom
|
||||
@@ -1,18 +0,0 @@
|
||||
options:
|
||||
submit-results:
|
||||
default: false
|
||||
description: Submit the results of benchmark runs to OpenBenchmarking.org.
|
||||
type: boolean
|
||||
proxy-address:
|
||||
default: ''
|
||||
description: The address of the proxy server to use.
|
||||
type: string
|
||||
proxy-port:
|
||||
default: 0
|
||||
description: The port of the proxy server to use.
|
||||
type: int
|
||||
user-config:
|
||||
default: ''
|
||||
description: The contents of the user-config.xml to use for defaults.
|
||||
type: string
|
||||
|
||||
@@ -1,60 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--Phoronix Test Suite v3.6.1 (Arendal)-->
|
||||
<?xml-stylesheet type="text/xsl" href="xsl/pts-user-config-viewer.xsl"?>
|
||||
<PhoronixTestSuite>
|
||||
<Options>
|
||||
<OpenBenchmarking>
|
||||
<AnonymousUsageReporting>FALSE</AnonymousUsageReporting>
|
||||
<AnonymousSoftwareReporting>FALSE</AnonymousSoftwareReporting>
|
||||
<AnonymousHardwareReporting>FALSE</AnonymousHardwareReporting>
|
||||
<IndexCacheTTL>3</IndexCacheTTL>
|
||||
<AlwaysUploadSystemLogs>FALSE</AlwaysUploadSystemLogs>
|
||||
</OpenBenchmarking>
|
||||
<General>
|
||||
<DefaultBrowser></DefaultBrowser>
|
||||
<UsePhodeviCache>TRUE</UsePhodeviCache>
|
||||
<DefaultDisplayMode>DEFAULT</DefaultDisplayMode>
|
||||
</General>
|
||||
<Modules>
|
||||
<LoadModules>toggle_screensaver, update_checker</LoadModules>
|
||||
</Modules>
|
||||
<Installation>
|
||||
<RemoveDownloadFiles>TRUE</RemoveDownloadFiles>
|
||||
<SearchMediaForCache>TRUE</SearchMediaForCache>
|
||||
<SymLinkFilesFromCache>FALSE</SymLinkFilesFromCache>
|
||||
<PromptForDownloadMirror>FALSE</PromptForDownloadMirror>
|
||||
<EnvironmentDirectory>~/.phoronix-test-suite/installed-tests/</EnvironmentDirectory>
|
||||
<CacheDirectory>~/.phoronix-test-suite/download-cache/</CacheDirectory>
|
||||
</Installation>
|
||||
<Testing>
|
||||
<SaveSystemLogs>TRUE</SaveSystemLogs>
|
||||
<SaveInstallationLogs>TRUE</SaveInstallationLogs>
|
||||
<SaveTestLogs>TRUE</SaveTestLogs>
|
||||
<RemoveTestInstallOnCompletion>FALSE</RemoveTestInstallOnCompletion>
|
||||
<ResultsDirectory>~/.phoronix-test-suite/test-results/</ResultsDirectory>
|
||||
<AlwaysUploadResultsToOpenBenchmarking>FALSE</AlwaysUploadResultsToOpenBenchmarking>
|
||||
</Testing>
|
||||
<TestResultValidation>
|
||||
<DynamicRunCount>TRUE</DynamicRunCount>
|
||||
<LimitDynamicToTestLength>20</LimitDynamicToTestLength>
|
||||
<StandardDeviationThreshold>3.50</StandardDeviationThreshold>
|
||||
<ExportResultsTo></ExportResultsTo>
|
||||
</TestResultValidation>
|
||||
<BatchMode>
|
||||
<SaveResults>TRUE</SaveResults>
|
||||
<OpenBrowser>FALSE</OpenBrowser>
|
||||
<UploadResults>FALSE</UploadResults>
|
||||
<PromptForTestIdentifier>FALSE</PromptForTestIdentifier>
|
||||
<PromptForTestDescription>FALSE</PromptForTestDescription>
|
||||
<PromptSaveName>FALSE</PromptSaveName>
|
||||
<RunAllTestCombinations>TRUE</RunAllTestCombinations>
|
||||
<Configured>TRUE</Configured>
|
||||
</BatchMode>
|
||||
<Networking>
|
||||
<NoNetworkCommunication>FALSE</NoNetworkCommunication>
|
||||
<Timeout>20</Timeout>
|
||||
<ProxyAddress></ProxyAddress>
|
||||
<ProxyPort></ProxyPort>
|
||||
</Networking>
|
||||
</Options>
|
||||
</PhoronixTestSuite>
|
||||
@@ -1,47 +0,0 @@
|
||||
PhoronixTestSuite:
|
||||
Options:
|
||||
Installation:
|
||||
SymLinkFilesFromCache: "FALSE"
|
||||
SearchMediaForCache: "TRUE"
|
||||
EnvironmentDirectory: ~/.phoronix-test-suite/installed-tests/
|
||||
PromptForDownloadMirror: "FALSE"
|
||||
RemoveDownloadFiles: "TRUE"
|
||||
CacheDirectory: ~/.phoronix-test-suite/download-cache/
|
||||
Modules:
|
||||
LoadModules: toggle_screensaver, update_checker
|
||||
General:
|
||||
DefaultDisplayMode: DEFAULT
|
||||
DefaultBrowser:
|
||||
UsePhodeviCache: "TRUE"
|
||||
Networking:
|
||||
ProxyPort:
|
||||
ProxyAddress:
|
||||
NoNetworkCommunication: "FALSE"
|
||||
Timeout: "20"
|
||||
BatchMode:
|
||||
PromptSaveName: "FALSE"
|
||||
SaveResults: "TRUE"
|
||||
Configured: "TRUE"
|
||||
RunAllTestCombinations: "TRUE"
|
||||
PromptForTestIdentifier: "FALSE"
|
||||
OpenBrowser: "FALSE"
|
||||
UploadResults: "FALSE"
|
||||
PromptForTestDescription: "FALSE"
|
||||
TestResultValidation:
|
||||
StandardDeviationThreshold: "3.50"
|
||||
DynamicRunCount: "TRUE"
|
||||
ExportResultsTo:
|
||||
LimitDynamicToTestLength: "20"
|
||||
Testing:
|
||||
RemoveTestInstallOnCompletion: "FALSE"
|
||||
ResultsDirectory: ~/.phoronix-test-suite/test-results/
|
||||
SaveSystemLogs: "TRUE"
|
||||
AlwaysUploadResultsToOpenBenchmarking: "FALSE"
|
||||
SaveTestLogs: "TRUE"
|
||||
SaveInstallationLogs: "TRUE"
|
||||
OpenBenchmarking:
|
||||
IndexCacheTTL: "3"
|
||||
AlwaysUploadSystemLogs: "FALSE"
|
||||
AnonymousUsageReporting: "FALSE"
|
||||
AnonymousHardwareReporting: "FALSE"
|
||||
AnonymousSoftwareReporting: "FALSE"
|
||||
@@ -1,24 +0,0 @@
|
||||
#!/usr/bin/env ruby
|
||||
# Author: Peter M. Petrakis <peter.petrakis@canonical.com>
|
||||
require 'rubygems'
|
||||
require 'nokogiri'
|
||||
require 'active_support' # for enhanced Hash
|
||||
# http://dirk.net/2010/08/05/convert-between-xml-hash-yaml-json-in-ruby-conversion-cheat-sheet/
|
||||
# We can convert to JSON, YAML, whatever.
|
||||
|
||||
def return_hash()
|
||||
pts_xml = 'dotfile-phoronix-test-suite/user-config.xml'
|
||||
pts_array = Array.new
|
||||
File.open(pts_xml).each { |x| pts_array.push(x) }
|
||||
my_hash = Hash.from_xml(pts_array.to_s)
|
||||
return my_hash
|
||||
end
|
||||
|
||||
if __FILE__ == $PROGRAM_NAME
|
||||
my_hash = return_hash()
|
||||
File.open('/tmp/yaml-out', 'w') do |fd|
|
||||
my_hash.to_yaml.each { |x| fd.puts(x) }
|
||||
end
|
||||
end
|
||||
|
||||
# vim:ts=2:sw=2:et:ft=ruby:
|
||||
@@ -1 +0,0 @@
|
||||
phoronix-common
|
||||
@@ -1 +0,0 @@
|
||||
phoronix-common
|
||||
@@ -1,178 +0,0 @@
|
||||
#!/bin/bash -u
|
||||
# cannot use set dash e with heredoc read variable assignment
|
||||
# vim:ts=2:sw=2:et:ft=sh:
|
||||
|
||||
CWD=$(dirname $0)
|
||||
TOP=${CHARM_DIR}
|
||||
COMMAND=$(basename $0)
|
||||
|
||||
# there's some hardcoded XML that depends on this so not
|
||||
# exposing this for now
|
||||
PTSDIR="/root/.phoronix-test-suite"
|
||||
PTSARCHIVE="/root/phoronix-archive"
|
||||
|
||||
# crazy right? :)
|
||||
# http://stackoverflow.com/questions/1167746/how-to-assign-a-heredoc-value-to-a-variable-in-bash
|
||||
# http://peterpetrakis.blogspot.com/2013/07/execute-complex-python-or-ruby-code.html
|
||||
read -r -d '' upstart_status <<'EOF'
|
||||
import sys, re
|
||||
import traceback
|
||||
from subprocess import Popen, PIPE
|
||||
try:
|
||||
state = sys.stdin.read().rstrip('\n')
|
||||
g = re.match('^([\w-]+)(\s[\w+\/]+)(, \w+ \d+)?',state).groups()
|
||||
# it always returns array.len = 3, if the last one isn't None, it's running
|
||||
if g[-1] is not None:
|
||||
print 'running'
|
||||
else:
|
||||
print 'stopped'
|
||||
except Exception:
|
||||
print 'running' # assume busted
|
||||
exc_type, exc_value, exc_traceback = sys.exc_info()
|
||||
lines = traceback.format_exception(exc_type, exc_value, exc_traceback)
|
||||
cmd = 'juju-log %s' % lines
|
||||
Popen(cmd.split(), stdout=PIPE)
|
||||
EOF
|
||||
|
||||
build_testsuites() {
|
||||
pts_mode=$(config-get pts_mode)
|
||||
juju-log "pts: building test config: ${pts_mode}"
|
||||
|
||||
if [ $pts_mode = 'full' ]; then
|
||||
# get each one and concat it all with some space padding
|
||||
local sys=$(config-get pts_sys)
|
||||
local cpu=$(config-get pts_cpu)
|
||||
local mem=$(config-get pts_mem)
|
||||
local io=$(config-get pts_io)
|
||||
|
||||
echo "${sys} ${cpu} ${mem} ${io}"
|
||||
|
||||
elif [ $pts_mode = 'custom' ]; then
|
||||
local tmp=$(config-get pts_custom)
|
||||
if [ -z $tmp ]; then
|
||||
echo " " # otherwise facter gets angry
|
||||
else
|
||||
echo "${tmp}"
|
||||
fi
|
||||
else
|
||||
# we default to something sensible
|
||||
echo $(config-get pts_smoke)
|
||||
fi
|
||||
}
|
||||
|
||||
# I know I could have just used vars for this but this
|
||||
# was a facter proving ground, the simplist possible use.
|
||||
install_job() {
|
||||
local job=/etc/init/cabs-runner.conf
|
||||
rm -f $job
|
||||
# the quotes around EOF suppress shell expansion
|
||||
tee $job <<'EOF'
|
||||
# run test suite
|
||||
description "Run phoronix test suite"
|
||||
|
||||
task
|
||||
|
||||
script
|
||||
mv -f /tmp/*tgz $(facter phoronix-archive) || :
|
||||
PTSRESULTS="/tmp/pts-results-$(uname -n)-$(date +%y%m%d%H%M%S).tgz"
|
||||
rm -rf $(facter phoronix-testdir) || :
|
||||
cp -Rpf $(facter phoronix-source) $(facter phoronix-testdir) || :
|
||||
echo 'Y N N' | phoronix-test-suite batch-install $(facter phoronix-testsuite)
|
||||
phoronix-test-suite batch-run $(facter phoronix-testsuite)
|
||||
tar cvf - $(facter phoronix-testdir) | gzip -c > "$PTSRESULTS"
|
||||
chmod 775 /tmp/*tgz || :
|
||||
end script
|
||||
EOF
|
||||
}
|
||||
|
||||
start_test() {
|
||||
juju-log "pts: starting test run - `date +%y%m%d%H%M%S`"
|
||||
initctl stop cabs-runner || :
|
||||
initctl start --no-wait cabs-runner || :
|
||||
}
|
||||
|
||||
stop_test() {
|
||||
juju-log "pts: stopping test run - `date +%y%m%d%H%M%S`"
|
||||
initctl stop cabs-runner || :
|
||||
}
|
||||
|
||||
clear_facts() {
|
||||
juju-log "puppet facter reset"
|
||||
fact-del phoronix-testsuite 2>&1 > /dev/null || :
|
||||
fact-del phoronix-testdir 2>&1 > /dev/null || :
|
||||
}
|
||||
|
||||
install_phoronix() {
|
||||
juju-log "installing phoronix"
|
||||
clear_facts
|
||||
stop_test
|
||||
apt-get -qq update
|
||||
apt-get install -qqy unzip build-essential default-jre-headless mesa-utils
|
||||
apt-get install -qqy phoronix-test-suite
|
||||
|
||||
apt-get install -qqy python python-pip
|
||||
pip install --upgrade charms.benchmark
|
||||
|
||||
# puppet helper to distribute facts between scripts
|
||||
apt-get install -qqy facter-customfacts-plugin
|
||||
|
||||
# install this to allow querying via upstart to proceed
|
||||
# for whatever reason, even though we're in 'config'
|
||||
# when we enter config_changed, the initial job isn't
|
||||
# created until we actually setup or run a test
|
||||
install_job
|
||||
|
||||
install --mode=775 -d $PTSARCHIVE
|
||||
fact-add phoronix-source "$TOP/files/dotfile-phoronix-test-suite"
|
||||
}
|
||||
|
||||
config_changed_phoronix() {
|
||||
# if we change this while a test is running we can't stop it
|
||||
# as upstart loses track of the pids
|
||||
|
||||
# We are devolving a bit in the meanwhile because of a newly
|
||||
# discovered bug in juju config where it coalesces config-set
|
||||
# under some circumstances making a deterministic interface
|
||||
# impossible.
|
||||
#
|
||||
# Until the benchmark-control interface is deployed... If you
|
||||
# try to do a config-set while the benchmark is running, config-changed
|
||||
# hook will simply die, prompting external intervention
|
||||
local state=$(initctl status cabs-runner | python -c "$upstart_status")
|
||||
juju-log "phoronix is $state"
|
||||
[ $state == 'running' ] && exit 1
|
||||
|
||||
juju-log 'configuring pts'
|
||||
|
||||
local suite=$(build_testsuites)
|
||||
fact-add phoronix-archive "$PTSARCHIVE"
|
||||
fact-add phoronix-testsuite "$suite"
|
||||
fact-add phoronix-testdir "$PTSDIR"
|
||||
|
||||
juju-log "confirm benchmark settings"
|
||||
juju-log "archive: $(facter phoronix-archive)"
|
||||
juju-log "suite: $(facter phoronix-testsuite)"
|
||||
juju-log "dir: $(facter phoronix-testdir)"
|
||||
}
|
||||
|
||||
case $COMMAND in
|
||||
install)
|
||||
install_phoronix
|
||||
;;
|
||||
start)
|
||||
juju-log "starting phoronix is a nop, use the upstart job"
|
||||
;;
|
||||
stop)
|
||||
juju-log "starting phoronix is a nop, use the upstart job"
|
||||
;;
|
||||
config-changed)
|
||||
config_changed_phoronix
|
||||
;;
|
||||
upgrade-charm)
|
||||
install_phoronix
|
||||
;;
|
||||
*)
|
||||
juju-log "command not recognized"
|
||||
esac
|
||||
|
||||
exit 0
|
||||
@@ -1 +0,0 @@
|
||||
phoronix-common
|
||||
@@ -1 +0,0 @@
|
||||
phoronix-common
|
||||
@@ -1 +0,0 @@
|
||||
phoronix-common
|
||||
@@ -1,6 +0,0 @@
|
||||
name: pts
|
||||
maintainer: Adam Israel <adam.israel@canonical.com>
|
||||
summary: The Phoronix Test Suite
|
||||
description: |
|
||||
Installs phoronix-test-suite and provides simple interface to enable
|
||||
individual stress tests and runs them via upstart job
|
||||
@@ -1 +0,0 @@
|
||||
15
|
||||
@@ -1,50 +0,0 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
import os
|
||||
import re
|
||||
import sys
|
||||
import json
|
||||
|
||||
import subprocess
|
||||
|
||||
import xml.etree.ElementTree as ET
|
||||
|
||||
# Description keys to strip for multi-test readability
|
||||
strips = ['Test: ', 'Type: ', 'PHP Benchmark Suite', ' ']
|
||||
|
||||
|
||||
def action_set(key, val):
|
||||
action_cmd = ['action-set']
|
||||
key = key.strip().replace(' ', '-')
|
||||
|
||||
if isinstance(val, dict):
|
||||
for k, v in val.iteritems():
|
||||
k = k.strip().replace(' ', '-')
|
||||
action_set('%s.%s' % (key, k), v)
|
||||
return
|
||||
|
||||
action_cmd.append('%s=%s' % (key, val))
|
||||
subprocess.check_call(action_cmd)
|
||||
|
||||
|
||||
test_file = sys.argv[1]
|
||||
|
||||
if not os.path.isfile(test_file):
|
||||
sys.exit(1)
|
||||
|
||||
tree = ET.parse(test_file)
|
||||
root = tree.getroot()
|
||||
|
||||
for result in root.iter('Result'):
|
||||
desc = result.find('Description').text
|
||||
for s in strips:
|
||||
desc = desc.replace(s, '')
|
||||
|
||||
test = result.find('Title').text.lower()
|
||||
desc = re.sub(r'[\W]', '-', desc.lower())
|
||||
value = result.find('Data').find('Entry').find('Value').text
|
||||
units = result.find('Scale').text
|
||||
|
||||
print(test, desc, value, units)
|
||||
key = 'results.%s-%s' % (test, desc) if desc else 'results.%s' % test
|
||||
action_set(key, {'value': value, 'units': units})
|
||||
@@ -30,8 +30,6 @@ PHORONIX TEST SUITE PUBLIC TODO LIST:
|
||||
|
||||
### POSSIBLE NEW TEST PROFILES ###
|
||||
|
||||
- Python-libmemcached [http://code.google.com/p/python-libmemcached/]
|
||||
- Intel HiBench [https://github.com/intel-hadoop/HiBench]
|
||||
- Hadoop Benchmarks / TeraSort
|
||||
- LATT Latency Tests [git://git.kernel.dk/latt.git]
|
||||
- QMC Beaver [http://qmcbeaver.sourceforge.net/]
|
||||
@@ -50,31 +48,17 @@ PHORONIX TEST SUITE PUBLIC TODO LIST:
|
||||
- http://sourceforge.net/projects/ffsb/
|
||||
- http://www.ratgpu.com/
|
||||
- http://panthema.net/2013/pmbw/
|
||||
- http://www.thedarkmod.com/
|
||||
- http://code.google.com/p/lz4/
|
||||
- http://parsec.cs.princeton.edu/parsec3-doc.htm
|
||||
- http://www.capsl.udel.edu/splash/Download.html
|
||||
- https://github.com/facebook/linkbench
|
||||
- https://github.com/vasi/pixz
|
||||
- stephentu/silo
|
||||
- http://nondot.org/sabre/LLVMNotes/#benchmarks
|
||||
- https://code.google.com/p/smhasher/wiki/SMHasher
|
||||
- http://benchmarksgame.alioth.debian.org/u32/performance.php?test=fasta / http://benchmarksgame.alioth.debian.org/u32/program.php?test=nbody&lang=gcc&id=1#sourcecode
|
||||
- https://openfoamwiki.net/index.php/Benchmarks_standard_v1
|
||||
- Cassandra 1.2 stress - http://docs.datastax.com/en/cassandra/1.2/cassandra/tools/toolsCStress_t.html
|
||||
- http://gcc.opensuse.org/c++bench-frescobaldi/
|
||||
- http://dacapobench.org/
|
||||
- https://github.com/GoogleCloudPlatform/PerfKitBenchmarker
|
||||
- https://gooseberry.blender.org/gooseberry-production-benchmark-file/
|
||||
- https://github.com/hhvm/oss-performance
|
||||
- https://github.com/gormanm/mmtests
|
||||
- https://github.com/pandegroup/fahbench
|
||||
- https://github.com/STH-Dev/linux-bench
|
||||
- http://anzwix.com/a/FFmpeg/CryptobenchAddSupportForBlowfish
|
||||
- https://wiki.mikejung.biz/Benchmarking
|
||||
- http://dacapobench.org/
|
||||
- https://github.com/soumith/convnet-benchmarks
|
||||
- https://github.com/cavazos-lab/FinanceBench
|
||||
|
||||
### WEB SOCKET / HTML5 USER INTERFACE WORK ###
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.TH phoronix-test-suite 1 "www.phoronix-test-suite.com" "6.6.1"
|
||||
.TH phoronix-test-suite 1 "www.phoronix-test-suite.com" "7.4.0"
|
||||
.SH NAME
|
||||
phoronix-test-suite \- The Phoronix Test Suite is an extensible open-source platform for performing testing and performance evaluation.
|
||||
.SH SYNOPSIS
|
||||
@@ -10,10 +10,13 @@ The **Phoronix Test Suite** is the most comprehensive testing and benchmarking p
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
.SH TEST INSTALLATION
|
||||
.B install [Test | Suite | OpenBenchmarking.org ID | Test Result] ...
|
||||
.B force-install [Test | Suite | OpenBenchmarking ID | Test Result] ...
|
||||
This option will force the installation (or re-installation) of a test or suite. The arguments and process is similar to the install option but even if the test is installed, the entire installation process will automatically be executed. This option is generally used when debugging a test installation problem.
|
||||
.TP
|
||||
.B install [Test | Suite | OpenBenchmarking ID | Test Result] ...
|
||||
This option will install the selected test(s) inside the testing environment directory. The install process from downloading of the test files to the installation is fully automated. The install option needs to be supplied with the test name or suite as an argument. Optionally, a OpenBenchmarking.org ID or the name of a saved results file can be supplied as well and the test(s) to install will automatically be extracted from that information. If the test is already installed and was run by the latest version of the installation process, no action will be taken. Multiple arguments can be supplied to install additional tests at the same time.
|
||||
.TP
|
||||
.B install-dependencies [Test | Suite | OpenBenchmarking.org ID | Test Result] ...
|
||||
.B install-dependencies [Test | Suite | OpenBenchmarking ID | Test Result] ...
|
||||
This option will install the external dependencies needed by the selected test(s) using the distribution's package management system. For example, some tests depend upon GCC for compiling code. If GCC is not detected on the system, the Phoronix Test Suite will attempt to install GCC using the distribution's package management system. If you are running this command as a local user, you may be prompted for the root password while the process is running. For unsupported distributions, the dependency names will be displayed along with common names for the package. The install-dependencies option needs to be supplied with the test name or suite as an argument. When using the install option, the external dependencies are automatically checked.
|
||||
.TP
|
||||
.B make-download-cache
|
||||
@@ -26,13 +29,16 @@ This option will permanently remove a installed test by the Phoronix Test Suite.
|
||||
.B auto-compare
|
||||
This option will autonomously determine the most relevant test(s) to run for any selected sub-system(s). The tests to run are determined via OpenBenchmarking.org integration with the global results pool. Related test results from OpenBenchmarking.org are also merged to provide a straight-forward and effective means of carrying out a system comparison. If wishing to find comparable results for any particular test profile(s), simply pass the test profile names as additional arguments to this command.
|
||||
.TP
|
||||
.B benchmark [Test | Suite | OpenBenchmarking.org ID | Test Result] ...
|
||||
.B benchmark [Test | Suite | OpenBenchmarking ID | Test Result] ...
|
||||
This option will install the selected test(s) (if needed) and will proceed to run the test(s). This option is equivalent to running phoronix-test-suite with the install option followed by the run option. Multiple arguments can be supplied to run additional tests at the same time and save the results into one file.
|
||||
.TP
|
||||
.B estimate-run-time [Test | Suite | OpenBenchmarking ID | Test Result]
|
||||
This option will provide estimates for test run-time / length.
|
||||
.TP
|
||||
.B finish-run [Test Result]
|
||||
This option can be used if a test run had not properly finished running all tests within a saved results file. Using this option when specifying a saved results file where all tests had not completed will attempt to finish testing on the remaining tests where there are missing results.
|
||||
.TP
|
||||
.B run [Test | Suite | OpenBenchmarking.org ID | Test Result] ...
|
||||
.B run [Test | Suite | OpenBenchmarking ID | Test Result] ...
|
||||
This option will run the selected test(s).
|
||||
.TP
|
||||
.B run-random-tests
|
||||
@@ -41,29 +47,29 @@ This option will query OpenBenchmarking.org to run random benchmarks and result
|
||||
.B run-tests-in-suite
|
||||
This option can be used if you wish to run all of the tests found in a supplied suite, but you wish to re-configure each of the test options rather than using the defaults supplied by the suite.
|
||||
.TP
|
||||
.B stress-run [Test | Suite | OpenBenchmarking.org ID | Test Result] ...
|
||||
.B stress-run [Test | Suite | OpenBenchmarking ID | Test Result] ...
|
||||
This option will run the passed tests/suites in the multi-process stress-testing mode. The stress-run mode will not produce a result file but is rather intended for running multiple test profiles concurrently to stress / burn-in the system. The number of tests to run concurrently can be toggled via the PTS_CONCURRENT_TEST_RUNS environment variable and by default is set to a value of 2.
|
||||
.TP
|
||||
.SH BATCH TESTING
|
||||
.B batch-benchmark [Test | Suite | OpenBenchmarking.org ID | Test Result] ...
|
||||
.B batch-benchmark [Test | Suite | OpenBenchmarking ID | Test Result] ...
|
||||
This option and its arguments are equivalent to the benchmark option, but the process will be run in the Phoronix Test Suite batch mode.
|
||||
.TP
|
||||
.B batch-install [Test | Suite | OpenBenchmarking.org ID | Test Result] ...
|
||||
.B batch-install [Test | Suite | OpenBenchmarking ID | Test Result] ...
|
||||
If you wish to run the install process in the Phoronix Test Suite batch mode but do not wish to run any tests at this time. Running the install process in the batch mode will use the default values and not prompt the user of any possible options, to ensure the process is fully automated.
|
||||
.TP
|
||||
.B batch-run [Test | Suite | OpenBenchmarking.org ID | Test Result] ...
|
||||
.B batch-run [Test | Suite | OpenBenchmarking ID | Test Result] ...
|
||||
This option and its arguments are equivalent to the run option, but the process will be run in the Phoronix Test Suite batch mode.
|
||||
.TP
|
||||
.B batch-setup
|
||||
This option is used to configure the batch mode options for the Phoronix Test Suite, which is subsequently written to the user configuration file. Among the options are whether to automatically upload the test results to OpenBenchmarking.org and prompting for the saved file name.
|
||||
.TP
|
||||
.B default-benchmark [Test | Suite | OpenBenchmarking.org ID | Test Result] ...
|
||||
.B default-benchmark [Test | Suite | OpenBenchmarking ID | Test Result] ...
|
||||
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.
|
||||
.TP
|
||||
.B default-run [Test | Suite | OpenBenchmarking.org ID | Test Result] ...
|
||||
.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 internal-run [Test | Suite | OpenBenchmarking.org ID | Test Result] ...
|
||||
.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
|
||||
.SH OPENBENCHMARKING.ORG
|
||||
@@ -101,9 +107,6 @@ This option can be used for uploading a test profile to your account on OpenBenc
|
||||
This option can be used for uploading a test suite to your account on OpenBenchmarking.org. By uploading your test suite to OpenBenchmarking.org, others are then able to browse and access this test suite for easy distribution.
|
||||
.TP
|
||||
.SH SYSTEM
|
||||
.B detailed-system-info
|
||||
Display detailed information about the installed system hardware and software information as detected by the Phoronix Test Suite Phodevi Library.
|
||||
.TP
|
||||
.B diagnostics
|
||||
This option will print information that is useful to developers when debugging problems with the Phoronix Test Suite and/or test profiles and test suites.
|
||||
.TP
|
||||
@@ -120,7 +123,7 @@ Display the installed system hardware and software information as detected by th
|
||||
Display the installed system hardware and software sensors in real-time as detected by the Phoronix Test Suite Phodevi Library.
|
||||
.TP
|
||||
.SH INFORMATION
|
||||
.B info [Test | Suite | OpenBenchmarking.org ID | Test Result]
|
||||
.B info [Test | Suite | OpenBenchmarking ID | Test Result]
|
||||
This option will show details about the supplied test, suite, virtual suite, or result file.
|
||||
.TP
|
||||
.B list-available-suites
|
||||
@@ -160,21 +163,24 @@ This option will list various details about installed tests and their usage.
|
||||
This option will list all available test profiles that are available from the enabled OpenBenchmarking.org repositories but are NOT SUPPORTED on the given hardware/software platform. This is mainly a debugging option for those looking for test profiles to potentially port to new platforms, etc.
|
||||
.TP
|
||||
.SH ASSET CREATION
|
||||
.B debug-benchmark [Test | Suite | OpenBenchmarking.org ID | Test Result] ...
|
||||
.B build-suite
|
||||
This option will guide the user through the process of generating their own test suite, which they can then run. Optionally, passed as arguments can be the test(s) or suite(s) to add to the suite to be created, instead of being prompted through the process.
|
||||
.TP
|
||||
.B debug-benchmark [Test | Suite | OpenBenchmarking ID | Test Result] ...
|
||||
This option is intended for use by test profile writers and is identical to the <em>run</em> option but will yield more information during the run process that can be used to debug issues with a test profile or to verify the test profile is functioning correctly.
|
||||
.TP
|
||||
.B debug-install [Test | Suite | OpenBenchmarking.org ID | Test Result] ...
|
||||
.B debug-install [Test | Suite | OpenBenchmarking ID | Test Result] ...
|
||||
This option is intended for use by test profile writers and is identical to the install option but will yield more information during the run process that can be used to debug issues with a test profile installer or to verify the test profile is functioning correctly.
|
||||
.TP
|
||||
.B debug-test-download-links [Test | Suite | OpenBenchmarking.org ID | Test Result]
|
||||
.B debug-result-parser [Test | Suite | OpenBenchmarking ID | Test Result] ...
|
||||
This option is intended for use by test profile writers and is used for debugging a result parser. No test execution is done, but there must already be PTS-generated .log files present within the test's installation directory.
|
||||
.TP
|
||||
.B debug-test-download-links [Test | Suite | OpenBenchmarking ID | Test Result]
|
||||
This option will check all download links within the specified test profile(s) to ensure there are no broken URLs.
|
||||
.TP
|
||||
.B download-test-files [Test | Suite | OpenBenchmarking.org ID | Test Result] ...
|
||||
.B download-test-files [Test | Suite | OpenBenchmarking ID | Test Result] ...
|
||||
This will download the selected test file(s) to the Phoronix Test Suite download cache but will not install the tests.
|
||||
.TP
|
||||
.B force-install [Test | Suite | OpenBenchmarking.org ID | Test Result] ...
|
||||
This option will force the installation (or re-installation) of a test or suite. The arguments and process is similar to the install option but even if the test is installed, the entire installation process will automatically be executed. This option is generally used when debugging a test installation problem.
|
||||
.TP
|
||||
.B result-file-to-suite [Test Result]
|
||||
This option will guide the user through the process of generating their own test suite, which they can then run, that is based upon an existing test results file.
|
||||
.TP
|
||||
@@ -188,6 +194,9 @@ This option can be used for validating a Phoronix Test Suite test profile as bei
|
||||
This option can be used for validating a Phoronix Test Suite test suite as being compliant against the OpenBenchmarking.org specification.
|
||||
.TP
|
||||
.SH RESULT MANAGEMENT
|
||||
.B analyze-all-runs [Test Result]
|
||||
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.
|
||||
.TP
|
||||
.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
|
||||
@@ -233,14 +242,10 @@ 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
|
||||
.SH RESULT ANALYTICS
|
||||
.B analyze-all-runs [Test Result]
|
||||
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.
|
||||
.B winners-and-losers [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
|
||||
.B build-suite
|
||||
This option will guide the user through the process of generating their own test suite, which they can then run. Optionally, passed as arguments can be the test(s) or suite(s) to add to the suite to be created, instead of being prompted through the process.
|
||||
.TP
|
||||
.B debug-dependency-handler
|
||||
This option is used for testing the distribution-specific dependency handler for external dependencies.
|
||||
.TP
|
||||
@@ -250,35 +255,16 @@ This option is used during the development of the Phoronix Test Suite software f
|
||||
.B debug-self-test
|
||||
This option is used during the development of the Phoronix Test Suite software for testing of internal interfaces, commands, and other common code-paths. The produced numbers should only be comparable for the same version of the Phoronix Test Suite, on the same hardware/software system, conducted on the same day of testing. This isn't intended as any scientific benchmark but simply to stress common PHP code-paths and looking for hot areas to optimize, etc.
|
||||
.TP
|
||||
.B enterprise-setup
|
||||
This option can be run by enterprise users immediately after package installation or as part of an in-house setup script. Running this command will ensure the phoronix-test-suite program is never interrupted on new runs to accept user agreement changes and defaults the anonymous usage reporting to being disabled and other conservative defaults.
|
||||
.TP
|
||||
.B help
|
||||
This option will display the list of available Phoronix Test Suite commands.
|
||||
.TP
|
||||
.B network-setup
|
||||
This option allows the user to configure how the Phoronix Test Suite connects to OpenBenchmarking.org and other web-services. Connecting through an HTTP proxy can be configured through this option.
|
||||
.TP
|
||||
.B user-config-reset
|
||||
This option can be used for resetting the Phoronix Test Suite user configuration file to its default state.
|
||||
.TP
|
||||
.B user-config-set
|
||||
This option can be used for setting an XML value in the Phoronix Test Suite user configuration file.
|
||||
.TP
|
||||
.B version
|
||||
This option will display the Phoronix Test Suite client version.
|
||||
.TP
|
||||
.SH WEB / GUI SUPPORT
|
||||
.B gui
|
||||
Launch the Phoronix Test Suite HTML5 web user-interface in the local GUI mode (no remote web support) and attempt to auto-launch the web-browser.
|
||||
.TP
|
||||
.B start-remote-gui-server
|
||||
Start the GUI web server and WebSocket server processes for remote (or local) access via the web-browser. The settings can be configured via the Phoronix Test Suite's XML configuration file.
|
||||
.TP
|
||||
.B start-ws-server
|
||||
Manually start a WebSocket server for communication by remote Phoronix Test Suite GUIs, the Phoronix Test Suite Multi-System Commander, and other functionality. This function checks the PTS_WEBSOCKET_PORT and PTS_WEBSOCKET_SERVER environment variables for configuration.
|
||||
.TP
|
||||
.SH MODULES
|
||||
.B auto-load-module
|
||||
This option can be used for easily adding a module to the LoadModules list in the Phoronix Test Suite user configuration file. That list controls what PTS modules are automatically loaded on start-up of the Phoronix Test Suite.
|
||||
.TP
|
||||
.B list-modules
|
||||
This option will list all of the available Phoronix Test Suite modules on this system.
|
||||
.TP
|
||||
@@ -291,9 +277,38 @@ This option will allow you to configure all available end-user options for a Pho
|
||||
.B test-module [Phoronix Test Suite Module]
|
||||
This option can be used for debugging a Phoronix Test Suite module.
|
||||
.TP
|
||||
.B unload-module
|
||||
This option can be used for easily removing a module from the LoadModules list in the Phoronix Test Suite user configuration file. That list controls what modules are automatically loaded on start-up of the Phoronix Test Suite.
|
||||
.TP
|
||||
.SH USER CONFIGURATION
|
||||
.B enterprise-setup
|
||||
This option can be run by enterprise users immediately after package installation or as part of an in-house setup script. Running this command will ensure the phoronix-test-suite program is never interrupted on new runs to accept user agreement changes and defaults the anonymous usage reporting to being disabled and other conservative defaults.
|
||||
.TP
|
||||
.B network-info
|
||||
This option will print information detected by the Phoronix Test Suite around the system's network configuration.
|
||||
.TP
|
||||
.B network-setup
|
||||
This option allows the user to configure how the Phoronix Test Suite connects to OpenBenchmarking.org and other web-services. Connecting through an HTTP proxy can be configured through this option.
|
||||
.TP
|
||||
.B user-config-reset
|
||||
This option can be used for resetting the Phoronix Test Suite user configuration file to its default state.
|
||||
.TP
|
||||
.B user-config-set
|
||||
This option can be used for setting an XML value in the Phoronix Test Suite user configuration file.
|
||||
.TP
|
||||
.SH WEB / GUI SUPPORT
|
||||
.B gui
|
||||
Launch the Phoronix Test Suite HTML5 web user-interface in the local GUI mode (no remote web support) and attempt to auto-launch the web-browser. THIS FEATURE IS CURRENTLY EXPERIMENTAL AND NO LONGER ACTIVE DEVELOPMENT. See Phoronix Test Suite Phoromatic as an alternative web UI approach.
|
||||
.TP
|
||||
.B start-remote-gui-server
|
||||
Start the GUI web server and WebSocket server processes for remote (or local) access via the web-browser. The settings can be configured via the Phoronix Test Suite's XML configuration file.
|
||||
.TP
|
||||
.B start-ws-server
|
||||
Manually start a WebSocket server for communication by remote Phoronix Test Suite GUIs, the Phoronix Test Suite Multi-System Commander, and other functionality. This function checks the PTS_WEBSOCKET_PORT and PTS_WEBSOCKET_SERVER environment variables for configuration.
|
||||
.TP
|
||||
.SH PHOROMATIC
|
||||
.B g
|
||||
n
|
||||
.B n
|
||||
_
|
||||
.TP
|
||||
.SH SEE ALSO
|
||||
.B Websites:
|
||||
@@ -308,5 +323,5 @@ http://www.phoronix.com/
|
||||
.br
|
||||
http://www.phoronix.com/forums/
|
||||
.SH AUTHORS
|
||||
Copyright 2008 - 2016 by Phoronix Media, Michael Larabel.
|
||||
Copyright 2008 - 2017 by Phoronix Media, Michael Larabel.
|
||||
.TP
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -8,7 +8,7 @@
|
||||
<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>
|
||||
<p>The only required dependency for the Phoronix Test Suite is PHP 5.3 or newer. On Linux distributions, the needed package is commonly called <em>php5-cli</em> or <em>php-cli</em> or <em>php</em>. It is important to note that only PHP for the command-line is needed and not a web server (Apache) or other packages commonly associated with PHP and its usage by web-sites. The PHP5 version required is PHP 5.3+ and can also be found at <a href="http://www.php.net/">www.php.net</a>.</p>
|
||||
<p>The only required dependency for the Phoronix Test Suite is PHP 5.3 or newer. On Linux distributions, the needed package is commonly called <em>php5-cli</em> or <em>php-cli</em> or <em>php7</em> or <em>php</em>. It is important to note that only PHP for the command-line is needed and not a web server (Apache) or other packages commonly associated with PHP and its usage by web-sites. The PHP5 version required is PHP 5.3+ and can also be found at <a href="http://www.php.net/">www.php.net</a>. PHP 7 is fully supported by the Phoronix Test Suite as well as HHVM.</p>
|
||||
|
||||
<p>For installing PHP on Windows, the <a href="https://www.microsoft.com/web/platform/phponwindows.aspx">Microsoft Web Platform Installer</a> provides an automated alternative that will install PHP into the directory expected by Phoronix Test Suite. Users opting to install PHP manually must extract the files to <em>C:\Program Files (x86)\PHP\</em> or a subdirectory.</p>
|
||||
<p>As part of the PHP requirement, the following PHP extensions are required and/or highly recommended in order to take advantage of the Phoronix Test Suite capabilities:</p>
|
||||
|
||||
@@ -31,6 +31,8 @@
|
||||
<p>For setting any test option(s) from an environment variable rather than being prompted for the options when running a test. Example: <em>PRESET_OPTIONS="stream.run-type=Add" ./phoronix-test-suite benchmark stream</em>. Multiple options can be passed to this environment variable when delimited by a semicolon.</p>
|
||||
<p><strong>SKIP_TESTS</strong></p>
|
||||
<p>If there are any test(s) to exempt from the testing process, specify them in this variable. Multiple tests can be waived by delimiting each test identifier by a comma. A test hardware type (i.e. Graphics) can also be supplied for skipping a range of tests.</p>
|
||||
<p><strong>SKIP_TESTS_HAVING_ARGS</strong></p>
|
||||
<p>If any of the test(s) have an argument matching any strings contained in this environment variable, the test execution will be skipped. Multiple strings can be set when delimiting by a comma.</p>
|
||||
<p><strong>RUN_TESTS_IN_RANDOM_ORDER</strong></p>
|
||||
<p>Setting this environment variable will cause the tests to be run in a random order.</p>
|
||||
<p><strong>SKIP_TESTING_SUBSYSTEMS</strong></p>
|
||||
@@ -62,7 +64,9 @@
|
||||
<p><strong>PTS_DOWNLOAD_CACHE</strong></p>
|
||||
<p>While non-standard Phoronix Test Suite download caches can be specified within the <em>user-config.xml</em> file, an additional directory to look for potential Phoronix Test Suite download files can be specified by this variable.</p>
|
||||
<p><strong>GRAPH_HIGHLIGHT</strong></p>
|
||||
<p>If this variable is set with a valid test identifer from a result file whether you are using the <em>refresh-graphs</em> command or any other related to the rendering of test results on a bar graph, the specified test identifier's result will be highlighted in a different color than the other rendered test results. Multiple identifiers can be specified when delimited by a comma.</p>
|
||||
<p>If this variable is set with a valid test identifer from a result file whether you are using the <em>refresh-graphs</em> command or any other related to the rendering of test results on a bar graph, the specified test identifier's result will be rendered in a different color than the other test results. Multiple identifiers can be specified when delimited by a comma. Additionally, for each key it is possible to provide the actual color value, or an index in the color palette. Example: "will_be_different,group1a=1,group1b=1,blue=#0000ff"</p>
|
||||
<p><strong>TEST_EXEC_PREPEND</strong></p>
|
||||
<p>Set this variable to any command/environment variable that you may be passed prepended to the test execution string at runtime.</p>
|
||||
<p><strong>VIDEO_MEMORY</strong></p>
|
||||
<p>If Phodevi fails to detect the system's video memory capacity or is incorrectly detected, the video memory capacity (in MB) can be specified by this variable.</p>
|
||||
<p><strong>OVERRIDE_VIDEO_MODES</strong></p>
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -18,8 +18,8 @@ The Phoronix Test Suite can be installed for system-wide usage or run locally wi
|
||||
|
||||
The process to download, install/setup, execute, and report the results of a benchmark can be as simple as a command such as `phoronix-test-suite benchmark smallpt` to run a simple CPU test profile. If wishing to simply install a test, it's a matter of running `phoronix-test-suite install <test or suite name>` and to run it's `phoronix-test-suite run <test or suite name>`. There's also a batch mode for non-interactive benchmarking by first running `phoronix-test-suite batch-setup` and then using the `batch-run` sub-command rather than `run`.
|
||||
|
||||
Viewing installed system hardware and software is available via `phoronix-test-suite system-info` or `phoronix-test-suite detailed-system-info` for greater verbosity.
|
||||
Viewing installed system hardware and software is available via `phoronix-test-suite system-info`.
|
||||
|
||||
Facilitating a result comparison from OpenBenchmarking.org can be done by running, for example, `phoronix-test-suite benchmark 1204293-BY-PHORONIX357` if wishing to compare the results of the `http://openbenchmarking.org/result/1204293-BY-PHORONIX357` result file.
|
||||
|
||||
Additional information is available from the Phoronix Test Suite website <http://www.phoronix-test-suite.com/> and the material bundled within the `phoronix-test-suite/documentation/` directory. A man page is also bundled with the phoronix-test-suite software.
|
||||
Additional information is available from the Phoronix Test Suite website <http://www.phoronix-test-suite.com/> and the material bundled within the `phoronix-test-suite/documentation/` directory or via <http://www.phoronix-test-suite.com/documentation/>. A man page is also bundled with the phoronix-test-suite software.
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
# Phoronix Test Suite
|
||||
# URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
# Copyright (C) 2008 - 2016, Phoronix Media
|
||||
# Copyright (C) 2008 - 2017, 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 - 2016, Phoronix Media
|
||||
# Copyright (C) 2008 - 2016, Michael Larabel
|
||||
# Copyright (C) 2008 - 2017, Phoronix Media
|
||||
# Copyright (C) 2008 - 2017, 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
|
||||
@@ -92,7 +92,7 @@ if [ "X$PHP_BIN" = "X" ]
|
||||
then
|
||||
cat <<'EOT'
|
||||
|
||||
PHP 5.3 or newer must be installed for the Phoronix Test Suite
|
||||
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/
|
||||
|
||||
@@ -102,7 +102,7 @@ if [ -x /usr/bin/zypper ]
|
||||
then
|
||||
# SUSE / OpenSUSE
|
||||
echo "The command to likely run for your operating system is: "
|
||||
echo "# zypper install php5 php5-zip"
|
||||
echo "# zypper install php7 php7-zip"
|
||||
echo " "
|
||||
elif [ -x /usr/bin/apt-get ]
|
||||
then
|
||||
@@ -174,7 +174,7 @@ elif [ -x /sbin/apk ]
|
||||
then
|
||||
# Alpine Linux
|
||||
echo "The command to likely run for your operating system is: "
|
||||
echo "# apk add php php-dom php-zip php-json"
|
||||
echo "# apk add php5 php5-dom php5-zip php5-json"
|
||||
echo " "
|
||||
elif [ -x /usr/bin/urpmi ]
|
||||
then
|
||||
@@ -182,6 +182,12 @@ then
|
||||
echo "The command to likely run for your operating system is: "
|
||||
echo "# urpmi php-cli"
|
||||
echo " "
|
||||
elif [ -x /usr/bin/eopkg ]
|
||||
then
|
||||
# Solus Linux
|
||||
echo "The command to likely run for your operating system is: "
|
||||
echo "# eopkg install php"
|
||||
echo " "
|
||||
fi
|
||||
|
||||
exit
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
:: 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 - 2017, Phoronix Media
|
||||
:: Copyright (C) 2008 - 2017, 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
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
*/
|
||||
class analyze_all_runs implements pts_option_interface
|
||||
{
|
||||
const doc_section = 'Result Analytics';
|
||||
const doc_section = 'Result Management';
|
||||
const doc_description = '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.';
|
||||
public static function argument_checks()
|
||||
{
|
||||
|
||||
68
pts-core/commands/auto_load_module.php
Normal file
68
pts-core/commands/auto_load_module.php
Normal file
@@ -0,0 +1,68 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2017, Phoronix Media
|
||||
Copyright (C) 2017, 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 auto_load_module implements pts_option_interface
|
||||
{
|
||||
const doc_section = 'Modules';
|
||||
const doc_description = 'This option can be used for easily adding a module to the LoadModules list in the Phoronix Test Suite user configuration file. That list controls what PTS modules are automatically loaded on start-up of the Phoronix Test Suite.';
|
||||
|
||||
public static function run($r)
|
||||
{
|
||||
$loaded_modules = pts_strings::comma_explode(pts_config::read_user_config('PhoronixTestSuite/Options/Modules/LoadModules', null));
|
||||
$available_modules = pts_module_manager::list_available_modules();
|
||||
echo PHP_EOL . 'Currently Loaded Modules: ' . PHP_EOL;
|
||||
echo pts_user_io::display_text_list($loaded_modules);
|
||||
echo PHP_EOL . 'Available Modules: ' . PHP_EOL;
|
||||
echo pts_user_io::display_text_list($available_modules);
|
||||
|
||||
|
||||
if(count($r) == 0)
|
||||
{
|
||||
echo PHP_EOL . 'You must specify a valid module from the list to load.' . PHP_EOL;
|
||||
echo 'Example: phoronix-test-suite auto-load-module update_checker' . PHP_EOL;
|
||||
return false;
|
||||
}
|
||||
|
||||
foreach($r as $module_to_load)
|
||||
{
|
||||
if(!in_array($module_to_load, $available_modules))
|
||||
{
|
||||
echo PHP_EOL . 'Module Not Available: ' . $module_to_load . PHP_EOL;
|
||||
}
|
||||
else if(in_array($module_to_load, $loaded_modules))
|
||||
{
|
||||
echo PHP_EOL . 'Module Already Loaded: ' . $module_to_load . PHP_EOL;
|
||||
}
|
||||
else
|
||||
{
|
||||
echo PHP_EOL . 'Module To Load: ' . $module_to_load . PHP_EOL;
|
||||
array_push($loaded_modules, $module_to_load);
|
||||
}
|
||||
}
|
||||
|
||||
$new_options = array('PhoronixTestSuite/Options/Modules/LoadModules' => implode(', ', $loaded_modules));
|
||||
pts_config::user_config_generate($new_options);
|
||||
echo PHP_EOL . 'New user configuration file written.' . PHP_EOL . PHP_EOL;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -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 - 2017, Phoronix Media
|
||||
Copyright (C) 2008 - 2017, 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,7 +22,7 @@
|
||||
|
||||
class build_suite implements pts_option_interface
|
||||
{
|
||||
const doc_section = 'Other';
|
||||
const doc_section = 'Asset Creation';
|
||||
const doc_description = 'This option will guide the user through the process of generating their own test suite, which they can then run. Optionally, passed as arguments can be the test(s) or suite(s) to add to the suite to be created, instead of being prompted through the process.';
|
||||
|
||||
public static function run($r)
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2015 - 2016, Phoronix Media
|
||||
Copyright (C) 2015 - 2016, Michael Larabel
|
||||
Copyright (C) 2015 - 2017, Phoronix Media
|
||||
Copyright (C) 2015 - 2017, 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
|
||||
@@ -101,6 +101,19 @@ class debug_render_test implements pts_option_interface
|
||||
$dump_size += strlen($html_dump);
|
||||
file_put_contents(PATH_TO_EXPORTED_PHOROMATIC_DATA . $REQUESTED . '.html', $html_dump . '</body></html>');
|
||||
}
|
||||
|
||||
if(getenv('DEBUG_RENDER_TEST_LOCAL_TOO') != false)
|
||||
{
|
||||
echo PHP_EOL . 'LOCAL RENDER TEST TIME' . PHP_EOL;
|
||||
$extra_graph_attributes = null;
|
||||
foreach(pts_client::saved_test_results() as $saved_result)
|
||||
{
|
||||
$save_to_dir = pts_client::setup_test_result_directory($saved_result);
|
||||
$generated_graphs = pts_client::generate_result_file_graphs($saved_result, $save_to_dir, $extra_graph_attributes);
|
||||
echo $saved_result . ': ' . count($generated_graphs) . PHP_EOL;
|
||||
}
|
||||
}
|
||||
|
||||
echo PHP_EOL . 'RENDER TEST TOOK: ' . (time() - $start) . PHP_EOL . PHP_EOL;
|
||||
echo PHP_EOL . 'PEAK MEMORY USAGE: ' . round(memory_get_peak_usage(true) / 1048576, 3) . ' MB';
|
||||
echo PHP_EOL . 'PEAK MEMORY USAGE (emalloc): ' . round(memory_get_peak_usage() / 1048576, 3) . ' MB';
|
||||
|
||||
48
pts-core/commands/debug_result_parser.php
Normal file
48
pts-core/commands/debug_result_parser.php
Normal file
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2017, Phoronix Media
|
||||
Copyright (C) 2017, 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 debug_result_parser implements pts_option_interface
|
||||
{
|
||||
const doc_section = 'Asset Creation';
|
||||
const doc_description = 'This option is intended for use by test profile writers and is used for debugging a result parser. No test execution is done, but there must already be PTS-generated .log files present within the test\'s installation directory.';
|
||||
|
||||
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)
|
||||
{
|
||||
// Make sure you're debugging the latest test script...
|
||||
//pts_test_installer::standard_install($r);
|
||||
// For debugging, usually running just once is sufficient, unless FORCE_TIMES_TO_RUN is preset
|
||||
pts_client::pts_set_environment_variable('FORCE_TIMES_TO_RUN', 1);
|
||||
// Run the test(s) in debug mode
|
||||
pts_client::set_debug_mode(true);
|
||||
$test_run_manager = new pts_test_run_manager();
|
||||
$test_run_manager->DEBUG_no_test_execution_just_result_parse = true;
|
||||
$test_run_manager->standard_run($r);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -1,57 +0,0 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2011 - 2015, Phoronix Media
|
||||
Copyright (C) 2011 - 2015, 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 detailed_system_info implements pts_option_interface
|
||||
{
|
||||
const doc_section = 'System';
|
||||
const doc_description = 'Display detailed information about the installed system hardware and software information as detected by the Phoronix Test Suite Phodevi Library.';
|
||||
|
||||
public static function run($r)
|
||||
{
|
||||
pts_client::$display->generic_heading('System Information');
|
||||
echo 'Hardware:' . PHP_EOL . phodevi::system_hardware(true) . PHP_EOL . PHP_EOL;
|
||||
echo 'Software:' . PHP_EOL . phodevi::system_software(true) . PHP_EOL . PHP_EOL;
|
||||
|
||||
//
|
||||
// Processor Information
|
||||
//
|
||||
|
||||
$cpu_flags = phodevi_cpu::get_cpu_flags();
|
||||
echo PHP_EOL . 'PROCESSOR:' . PHP_EOL . PHP_EOL;
|
||||
echo 'Core Count: ' . phodevi_cpu::cpuinfo_core_count() . PHP_EOL;
|
||||
echo 'Thread Count: ' . phodevi_cpu::cpuinfo_thread_count() . PHP_EOL;
|
||||
echo 'Cache Size: ' . phodevi_cpu::cpuinfo_cache_size() . ' KB' . PHP_EOL;
|
||||
|
||||
echo 'Instruction Set Extensions: ' . phodevi_cpu::instruction_set_extensions() . PHP_EOL;
|
||||
echo 'AES Encryption: ' . ($cpu_flags & phodevi_cpu::get_cpu_feature_constant('aes') ? 'YES' : 'NO') . PHP_EOL;
|
||||
echo 'Energy Performance Bias: ' . ($cpu_flags & phodevi_cpu::get_cpu_feature_constant('epb') ? 'YES' : 'NO') . PHP_EOL;
|
||||
echo 'Virtualization: ' . (phodevi_cpu::virtualization_technology() ? phodevi_cpu::virtualization_technology() : 'NO') . PHP_EOL;
|
||||
|
||||
// Other info
|
||||
foreach(pts_arrays::to_array(pts_test_run_manager::pull_test_notes(true)) as $test_note_head => $test_note)
|
||||
{
|
||||
echo ucwords(str_replace('-', ' ', $test_note_head)) . ': ' . $test_note . PHP_EOL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -3,8 +3,8 @@
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2010 - 2015, Phoronix Media
|
||||
Copyright (C) 2010 - 2015, Michael Larabel
|
||||
Copyright (C) 2010 - 2017, Phoronix Media
|
||||
Copyright (C) 2010 - 2017, 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
|
||||
@@ -40,6 +40,7 @@ class dump_documentation implements pts_option_interface
|
||||
|
||||
// Write the test options HTML
|
||||
$dom = new DOMDocument();
|
||||
$dom->formatOutput = true;
|
||||
$html = $dom->createElement('html');
|
||||
$dom->appendChild($html);
|
||||
$head = $dom->createElement('head');
|
||||
@@ -93,7 +94,7 @@ class dump_documentation implements pts_option_interface
|
||||
$body = $dom->createElement('body');
|
||||
$html->appendChild($body);
|
||||
|
||||
$p = $dom->createElement('p', 'The following list is the modules included with the Phoronix Test Suite that are intended to extend the functionality of pts-core. Some of these options have commands that can be run directly in a similiar manner to the other Phoronix Test Suite user commands. Some modules are just meant to be loaded directly by adding the module name to the LoadModules tag in ~/.phoronix-test-suite/user-config.xml or via the PTS_MODULES environmental variable. A list of available modules is also available by running ');
|
||||
$p = $dom->createElement('p', 'The following list is the modules included with the Phoronix Test Suite that are intended to extend the functionality of pts-core. Some of these options have commands that can be run directly in a similiar manner to the other Phoronix Test Suite user commands. Some modules are just meant to be loaded directly by adding the module name to the LoadModules tag in ~/.phoronix-test-suite/user-config.xml or via the PTS_MODULES environment variable. A list of available modules is also available by running ');
|
||||
$em = $dom->createElement('em', 'phoronix-test-suite list-modules.');
|
||||
$p->appendChild($em);
|
||||
$phr = $dom->createElement('hr');
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2010, Phoronix Media
|
||||
Copyright (C) 2010, Michael Larabel
|
||||
Copyright (C) 2017, Phoronix Media
|
||||
Copyright (C) 2017, 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
|
||||
@@ -20,15 +20,31 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
class pts_parse_results_nye_XmlReader extends nye_XmlReader
|
||||
class dump_file_info implements pts_option_interface
|
||||
{
|
||||
public function __construct($read_xml)
|
||||
public static function run($r)
|
||||
{
|
||||
parent::__construct($read_xml);
|
||||
}
|
||||
public function validate()
|
||||
{
|
||||
return $this->dom->schemaValidate(PTS_OPENBENCHMARKING_PATH . 'schemas/results-parser.xsd');
|
||||
pts_client::$display->generic_heading('File Information');
|
||||
if(empty($r))
|
||||
{
|
||||
echo PHP_EOL . 'No files passed.' . PHP_EOL;
|
||||
}
|
||||
foreach($r as $f)
|
||||
{
|
||||
if(!is_file($f))
|
||||
{
|
||||
echo PHP_EOL . 'Not a file: ' . $f . PHP_EOL;
|
||||
}
|
||||
else
|
||||
{
|
||||
echo PHP_EOL . 'FILE: ' . basename($f) . PHP_EOL;
|
||||
echo 'MD5: ' . md5_file($f) . PHP_EOL;
|
||||
echo 'SHA256: ' . hash_file('sha256', $f) . PHP_EOL;
|
||||
echo 'SIZE: ' . filesize($f) . PHP_EOL;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
80
pts-core/commands/dump_suites_to_git.php
Normal file
80
pts-core/commands/dump_suites_to_git.php
Normal file
@@ -0,0 +1,80 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2017, Phoronix Media
|
||||
Copyright (C) 2017, 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 dump_suites_to_git implements pts_option_interface
|
||||
{
|
||||
const doc_section = 'OpenBenchmarking.org';
|
||||
const doc_description = 'This option will create a Git repository of OpenBenchmarking.org test suites.';
|
||||
|
||||
public static function run($r)
|
||||
{
|
||||
pts_client::$display->generic_heading('OpenBenchmarking.org Tests To Suites');
|
||||
$path_to_git = getenv('TEST_SUITES_GIT_PATH') . '/';
|
||||
if(!pts_client::executable_in_path('git'))
|
||||
{
|
||||
echo PHP_EOL . 'git was not found on the system.' . PHP_EOL . PHP_EOL;
|
||||
return false;
|
||||
}
|
||||
if(empty($path_to_git) || !is_dir($path_to_git) || !is_writable($path_to_git))
|
||||
{
|
||||
echo PHP_EOL . 'TEST_SUITES_GIT_PATH must be set or the set directory is not writable/present.' . PHP_EOL . PHP_EOL;
|
||||
return false;
|
||||
}
|
||||
|
||||
shell_exec('cd ' . $path_to_git . ' && git pull');
|
||||
|
||||
foreach(pts_openbenchmarking::linked_repositories() as $repo)
|
||||
{
|
||||
if($repo == 'local')
|
||||
{
|
||||
// Skip local since it's a fake repository
|
||||
continue;
|
||||
}
|
||||
if(!is_dir($path_to_git . $repo))
|
||||
{
|
||||
pts_file_io::mkdir($path_to_git . $repo);
|
||||
}
|
||||
$repo_index = pts_openbenchmarking::read_repository_index($repo);
|
||||
$changes = pts_openbenchmarking_client::fetch_repository_changelog_full($repo);
|
||||
|
||||
foreach($changes['suites'] as $suite_identifier => $d)
|
||||
{
|
||||
foreach($d['changes'] as $suite_version => $dd)
|
||||
{
|
||||
$suite = $repo . '/' . $suite_identifier . '-' . $suite_version; // . ' ' . $dd['commit_description'] . ' ' . date('d F Y', $dd['last_updated']) . PHP_EOL;
|
||||
if(is_dir($path_to_git . $suite))
|
||||
continue;
|
||||
|
||||
pts_openbenchmarking::download_test_suite($suite, $path_to_git);
|
||||
if(is_dir($path_to_git . $suite))
|
||||
{
|
||||
$test_suite = new pts_test_suite($suite);
|
||||
echo 'git commit -m "' . $suite . ': ' . $dd['commit_description'] . '" --author="' . $test_suite->get_maintainer() . ' <no-reply@openbenchmarking.org>" --date="' . date(DATE_RFC2822, $dd['last_updated']) . '" ' . $suite . PHP_EOL;
|
||||
shell_exec('cd ' . $path_to_git . ' && git add ' . $suite . ' && git commit -m "' . $suite . ': ' . $dd['commit_description'] . '" --author="' . $test_suite->get_maintainer() . ' <no-reply@openbenchmarking.org>" --date="' . date(DATE_RFC2822, $dd['last_updated']) . '" ' . $suite);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
81
pts-core/commands/dump_tests_to_git.php
Normal file
81
pts-core/commands/dump_tests_to_git.php
Normal file
@@ -0,0 +1,81 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2017, Phoronix Media
|
||||
Copyright (C) 2017, 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 dump_tests_to_git implements pts_option_interface
|
||||
{
|
||||
const doc_section = 'OpenBenchmarking.org';
|
||||
const doc_description = 'This option will create a Git repository of OpenBenchmarking.org test profiles.';
|
||||
|
||||
public static function run($r)
|
||||
{
|
||||
pts_client::$display->generic_heading('OpenBenchmarking.org Tests To Git');
|
||||
$path_to_git = getenv('TEST_PROFILES_GIT_PATH') . '/';
|
||||
if(!pts_client::executable_in_path('git'))
|
||||
{
|
||||
echo PHP_EOL . 'git was not found on the system.' . PHP_EOL . PHP_EOL;
|
||||
return false;
|
||||
}
|
||||
if(empty($path_to_git) || !is_dir($path_to_git) || !is_writable($path_to_git))
|
||||
{
|
||||
echo PHP_EOL . 'TEST_PROFILES_GIT_PATH must be set or the set directory is not writable/present.' . PHP_EOL . PHP_EOL;
|
||||
return false;
|
||||
}
|
||||
|
||||
shell_exec('cd ' . $path_to_git . ' && git pull');
|
||||
|
||||
foreach(pts_openbenchmarking::linked_repositories() as $repo)
|
||||
{
|
||||
if($repo == 'local')
|
||||
{
|
||||
// Skip local since it's a fake repository
|
||||
continue;
|
||||
}
|
||||
if(!is_dir($path_to_git . $repo))
|
||||
{
|
||||
pts_file_io::mkdir($path_to_git . $repo);
|
||||
}
|
||||
$repo_index = pts_openbenchmarking::read_repository_index($repo);
|
||||
$changes = pts_openbenchmarking_client::fetch_repository_changelog_full($repo);
|
||||
|
||||
foreach($changes['tests'] as $test_identifier => $d)
|
||||
{
|
||||
foreach($d['changes'] as $test_version => $dd)
|
||||
{
|
||||
$test = $repo . '/' . $test_identifier . '-' . $test_version; // . ' ' . $dd['commit_description'] . ' ' . date('d F Y', $dd['last_updated']) . PHP_EOL;
|
||||
if(is_dir($path_to_git . $test))
|
||||
continue;
|
||||
|
||||
pts_openbenchmarking::download_test_profile($test, $path_to_git);
|
||||
if(is_dir($path_to_git . $test))
|
||||
{
|
||||
$test_profile = new pts_test_profile($test);
|
||||
$maintainer = $test_profile->get_maintainer() != null ? $test_profile->get_maintainer() : 'Phoronix Test Suite';
|
||||
echo 'git commit -m "' . $test . ': ' . $dd['commit_description'] . '" --author="' . $maintainer . ' <no-reply@openbenchmarking.org>" --date="' . date(DATE_RFC2822, $dd['last_updated']) . '" ' . $test . PHP_EOL;
|
||||
shell_exec('cd ' . $path_to_git . ' && git add ' . $test . ' && git commit -m "' . $test . ': ' . $dd['commit_description'] . '" --author="' . $maintainer . ' <no-reply@openbenchmarking.org>" --date="' . date(DATE_RFC2822, $dd['last_updated']) . '" ' . $test);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -3,8 +3,8 @@
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2014 - 2015, Phoronix Media
|
||||
Copyright (C) 2014 - 2015, Michael Larabel
|
||||
Copyright (C) 2014 - 2017, Phoronix Media
|
||||
Copyright (C) 2014 - 2017, 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,7 +22,7 @@
|
||||
|
||||
class enterprise_setup implements pts_option_interface
|
||||
{
|
||||
const doc_section = 'Other';
|
||||
const doc_section = 'User Configuration';
|
||||
const doc_description = 'This option can be run by enterprise users immediately after package installation or as part of an in-house setup script. Running this command will ensure the phoronix-test-suite program is never interrupted on new runs to accept user agreement changes and defaults the anonymous usage reporting to being disabled and other conservative defaults.';
|
||||
|
||||
public static function run($r)
|
||||
|
||||
63
pts-core/commands/estimate_run_time.php
Normal file
63
pts-core/commands/estimate_run_time.php
Normal file
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2017, Phoronix Media
|
||||
Copyright (C) 2017, 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 estimate_run_time implements pts_option_interface
|
||||
{
|
||||
const doc_section = 'Testing';
|
||||
const doc_description = 'This option will provide estimates for test run-time / length.';
|
||||
|
||||
public static function argument_checks()
|
||||
{
|
||||
return array(
|
||||
new pts_argument_check(0, array('pts_types', 'identifier_to_object'))
|
||||
);
|
||||
}
|
||||
public static function run($args)
|
||||
{
|
||||
echo PHP_EOL;
|
||||
|
||||
if($args[0] == 'pts/all' || empty($args))
|
||||
{
|
||||
$args = pts_openbenchmarking::available_tests(false);
|
||||
}
|
||||
|
||||
$tests = array();
|
||||
$total_time = 0;
|
||||
$test_count = 0;
|
||||
foreach($args as $arg)
|
||||
{
|
||||
foreach(pts_types::identifiers_to_test_profile_objects($arg) as $t)
|
||||
{
|
||||
$tests[] = array($t->get_identifier(), pts_strings::format_time($t->get_estimated_run_time()));
|
||||
$total_time += $t->get_estimated_run_time();
|
||||
$test_count++;
|
||||
}
|
||||
}
|
||||
if($test_count > 1 && $total_time > 0)
|
||||
{
|
||||
echo pts_user_io::display_text_table($tests);
|
||||
echo PHP_EOL . PHP_EOL . 'TOTAL TIME ESTIMATE: ' . pts_strings::format_time($total_time) . PHP_EOL . PHP_EOL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -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 - 2017, Phoronix Media
|
||||
Copyright (C) 2009 - 2017, 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,7 +22,7 @@
|
||||
|
||||
class force_install implements pts_option_interface
|
||||
{
|
||||
const doc_section = 'Asset Creation';
|
||||
const doc_section = 'Test Installation';
|
||||
const doc_description = 'This option will force the installation (or re-installation) of a test or suite. The arguments and process is similar to the install option but even if the test is installed, the entire installation process will automatically be executed. This option is generally used when debugging a test installation problem.';
|
||||
|
||||
public static function argument_checks()
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
class gui implements pts_option_interface
|
||||
{
|
||||
const doc_section = 'Web / GUI Support';
|
||||
const doc_description = 'Launch the Phoronix Test Suite HTML5 web user-interface in the local GUI mode (no remote web support) and attempt to auto-launch the web-browser.';
|
||||
const doc_description = 'Launch the Phoronix Test Suite HTML5 web user-interface in the local GUI mode (no remote web support) and attempt to auto-launch the web-browser. THIS FEATURE IS CURRENTLY EXPERIMENTAL AND NO LONGER ACTIVE DEVELOPMENT. See Phoronix Test Suite Phoromatic as an alternative web UI approach.';
|
||||
|
||||
public static function command_aliases()
|
||||
{
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2010 - 2015, Phoronix Media
|
||||
Copyright (C) 2010 - 2015, Michael Larabel
|
||||
Copyright (C) 2010 - 2017, Phoronix Media
|
||||
Copyright (C) 2010 - 2017, 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
|
||||
@@ -27,7 +27,7 @@ class help implements pts_option_interface
|
||||
|
||||
public static function run($r)
|
||||
{
|
||||
echo PHP_EOL . pts_core::program_title(true) . PHP_EOL . PHP_EOL;
|
||||
echo PHP_EOL . pts_client::cli_colored_text(pts_core::program_title(true), 'green', true) . PHP_EOL . PHP_EOL;
|
||||
echo pts_documentation::basic_description() . PHP_EOL . PHP_EOL . 'View the included PDF / HTML documentation or visit http://www.phoronix-test-suite.com/ for full details.' . PHP_EOL;
|
||||
$options = pts_documentation::client_commands_array();
|
||||
|
||||
@@ -38,13 +38,15 @@ class help implements pts_option_interface
|
||||
continue;
|
||||
}
|
||||
|
||||
echo PHP_EOL . strtoupper($section) . PHP_EOL . PHP_EOL;
|
||||
echo PHP_EOL . pts_client::cli_just_bold(strtoupper($section)) . PHP_EOL . PHP_EOL;
|
||||
|
||||
sort($contents);
|
||||
$tabled = array();
|
||||
foreach($contents as &$option)
|
||||
{
|
||||
echo ' ' . trim($option[0] . ' ' . implode(' ', $option[1])) . PHP_EOL;
|
||||
$tabled[] = array($option[0], pts_client::cli_colored_text(implode(' ', $option[1]), 'gray'));
|
||||
}
|
||||
echo pts_user_io::display_text_table($tabled, ' ') . PHP_EOL;
|
||||
}
|
||||
echo PHP_EOL;
|
||||
}
|
||||
|
||||
@@ -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 - 2017, Phoronix Media
|
||||
Copyright (C) 2008 - 2017, 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,20 +47,19 @@ class info implements pts_option_interface
|
||||
if($o instanceof pts_test_suite)
|
||||
{
|
||||
pts_client::$display->generic_heading($o->get_title());
|
||||
echo 'Run Identifier: ' . $o->get_identifier() . PHP_EOL;
|
||||
echo 'Suite Version: ' . $o->get_version() . PHP_EOL;
|
||||
echo 'Maintainer: ' . $o->get_maintainer() . PHP_EOL;
|
||||
echo 'Suite Type: ' . $o->get_suite_type() . PHP_EOL;
|
||||
echo 'Unique Tests: ' . $o->get_unique_test_count() . PHP_EOL;
|
||||
echo 'Suite Description: ' . $o->get_description() . PHP_EOL;
|
||||
echo PHP_EOL . 'Contained Tests: ' . PHP_EOL;
|
||||
$test_table = array();
|
||||
echo pts_client::cli_just_bold('Suite Description: ') . ' ' . $o->get_description() . PHP_EOL . PHP_EOL;
|
||||
$table = array();
|
||||
$table[] = array(pts_client::cli_just_bold('Run Identifier: '), $o->get_identifier());
|
||||
$table[] = array(pts_client::cli_just_bold('Suite Version: '), $o->get_version());
|
||||
$table[] = array(pts_client::cli_just_bold('Maintainer: '), $o->get_maintainer());
|
||||
$table[] = array(pts_client::cli_just_bold('Suite Type: '), $o->get_suite_type());
|
||||
$table[] = array(pts_client::cli_just_bold('Unique Tests: '), $o->get_unique_test_count());
|
||||
$table[] = array(pts_client::cli_just_bold('Contained Tests: '));
|
||||
foreach($o->get_contained_test_result_objects() as $result_obj)
|
||||
{
|
||||
$test_table[] = array($result_obj->test_profile->get_title(), $result_obj->get_arguments_description());
|
||||
$table[] = array(pts_client::cli_just_bold(null), $result_obj->test_profile->get_title() . ' ', $result_obj->get_arguments_description());
|
||||
}
|
||||
echo pts_user_io::display_text_table($test_table, ' ', 1);
|
||||
echo PHP_EOL;
|
||||
echo pts_user_io::display_text_table($table) . PHP_EOL;
|
||||
}
|
||||
else if($o instanceof pts_test_profile)
|
||||
{
|
||||
@@ -72,32 +71,36 @@ class info implements pts_option_interface
|
||||
}
|
||||
|
||||
pts_client::$display->generic_heading($test_title);
|
||||
echo 'Run Identifier: ' . $o->get_identifier() . PHP_EOL;
|
||||
echo 'Profile Version: ' . $o->get_test_profile_version() . PHP_EOL;
|
||||
echo 'Maintainer: ' . $o->get_maintainer() . PHP_EOL;
|
||||
echo 'Test Type: ' . $o->get_test_hardware_type() . PHP_EOL;
|
||||
echo 'Software Type: ' . $o->get_test_software_type() . PHP_EOL;
|
||||
echo 'License Type: ' . $o->get_license() . PHP_EOL;
|
||||
echo 'Test Status: ' . $o->get_status() . PHP_EOL;
|
||||
echo 'Project Web-Site: ' . $o->get_project_url() . PHP_EOL;
|
||||
$table = array();
|
||||
$table[] = array(pts_client::cli_just_bold('Run Identifier: '), $o->get_identifier());
|
||||
$table[] = array(pts_client::cli_just_bold('Profile Version: '), $o->get_test_profile_version());
|
||||
$table[] = array(pts_client::cli_just_bold('Maintainer: '), $o->get_maintainer());
|
||||
$table[] = array(pts_client::cli_just_bold('Test Type: '), $o->get_test_hardware_type());
|
||||
$table[] = array(pts_client::cli_just_bold('Software Type: '), $o->get_test_software_type());
|
||||
$table[] = array(pts_client::cli_just_bold('License Type: '), $o->get_license());
|
||||
$table[] = array(pts_client::cli_just_bold('Test Status: '), $o->get_status());
|
||||
$table[] = array(pts_client::cli_just_bold('Project Web-Site: '), $o->get_project_url());
|
||||
|
||||
if($o->get_estimated_run_time() > 1)
|
||||
{
|
||||
echo 'Estimated Run-Time: ' . $o->get_estimated_run_time() . ' Seconds' . PHP_EOL;
|
||||
$table[] = array(pts_client::cli_just_bold('Estimated Run-Time: '), $o->get_estimated_run_time() . ' Seconds');
|
||||
}
|
||||
|
||||
$download_size = $o->get_download_size();
|
||||
if(!empty($download_size))
|
||||
{
|
||||
echo 'Download Size: ' . $download_size . ' MB' . PHP_EOL;
|
||||
$table[] = array(pts_client::cli_just_bold('Download Size: '), $download_size . ' MB');
|
||||
}
|
||||
|
||||
$environment_size = $o->get_environment_size();
|
||||
if(!empty($environment_size))
|
||||
{
|
||||
echo 'Environment Size: ' . $environment_size . ' MB' . PHP_EOL;
|
||||
$table[] = array(pts_client::cli_just_bold('Environment Size: '), $environment_size . ' MB');
|
||||
}
|
||||
|
||||
echo PHP_EOL . 'Description: ' . $o->get_description() . PHP_EOL;
|
||||
echo pts_user_io::display_text_table($table);
|
||||
|
||||
echo PHP_EOL . PHP_EOL . pts_client::cli_just_bold('Description: ') . $o->get_description() . PHP_EOL. PHP_EOL;
|
||||
|
||||
if($o->test_installation != false)
|
||||
{
|
||||
@@ -108,38 +111,47 @@ class info implements pts_option_interface
|
||||
$avg_time = !empty($avg_time) ? pts_strings::format_time($avg_time, 'SECONDS') : 'N/A';
|
||||
$latest_time = $o->test_installation->get_latest_run_time();
|
||||
$latest_time = !empty($latest_time) ? pts_strings::format_time($latest_time, 'SECONDS') : 'N/A';
|
||||
$install_time = ceil($o->test_installation->get_latest_install_time());
|
||||
$install_time = !empty($install_time) ? pts_strings::format_time($install_time, 'SECONDS') : 'N/A';
|
||||
|
||||
echo PHP_EOL . 'Test Installed: Yes' . PHP_EOL;
|
||||
echo 'Last Run: ' . $last_run . PHP_EOL;
|
||||
$table = array();
|
||||
$table[] = array(pts_client::cli_just_bold('Test Installed: '), 'Yes');
|
||||
$table[] = array(pts_client::cli_just_bold('Last Run: '), $last_run);
|
||||
$table[] = array(pts_client::cli_just_bold('Install Time: '), $install_time);
|
||||
if($o->test_installation->get_install_size() > 0)
|
||||
{
|
||||
$table[] = array(pts_client::cli_just_bold('Install Size: '), $o->test_installation->get_install_size() . ' Bytes');
|
||||
}
|
||||
|
||||
if($last_run != 'Never')
|
||||
{
|
||||
if($o->test_installation->get_run_count() > 1)
|
||||
{
|
||||
echo 'Average Run-Time: ' . $avg_time . PHP_EOL;
|
||||
$table[] = array(pts_client::cli_just_bold('Average Run-Time: '), $avg_time);
|
||||
}
|
||||
|
||||
echo 'Latest Run-Time: ' . $latest_time . PHP_EOL;
|
||||
echo 'Times Run: ' . $o->test_installation->get_run_count() . PHP_EOL;
|
||||
$table[] = array(pts_client::cli_just_bold('Latest Run-Time: '), $latest_time);
|
||||
$table[] = array(pts_client::cli_just_bold('Times Run: '), $o->test_installation->get_run_count());
|
||||
}
|
||||
echo pts_user_io::display_text_table($table) . PHP_EOL;
|
||||
}
|
||||
else
|
||||
{
|
||||
echo PHP_EOL . 'Test Installed: No' . PHP_EOL;
|
||||
echo PHP_EOL . pts_client::cli_just_bold('Test Installed: ') . 'No' . PHP_EOL;
|
||||
}
|
||||
|
||||
$dependencies = $o->get_external_dependencies();
|
||||
if(!empty($dependencies) && !empty($dependencies[0]))
|
||||
{
|
||||
echo PHP_EOL . 'Software Dependencies:' . PHP_EOL;
|
||||
echo PHP_EOL . pts_client::cli_just_bold('Software Dependencies:') . PHP_EOL;
|
||||
echo pts_user_io::display_text_list($o->get_dependency_names());
|
||||
}
|
||||
echo PHP_EOL;
|
||||
}
|
||||
else if($o instanceof pts_result_file)
|
||||
{
|
||||
echo 'Title: ' . $o->get_title() . PHP_EOL . 'Identifier: ' . $o->get_identifier() . PHP_EOL;
|
||||
echo PHP_EOL . 'Test Result Identifiers:' . PHP_EOL;
|
||||
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());
|
||||
|
||||
$test_titles = array();
|
||||
@@ -153,7 +165,7 @@ class info implements pts_option_interface
|
||||
|
||||
if(count($test_titles) > 0)
|
||||
{
|
||||
echo PHP_EOL . 'Contained Tests:' . PHP_EOL;
|
||||
echo PHP_EOL . pts_client::cli_just_bold('Contained Tests:') . PHP_EOL;
|
||||
echo pts_user_io::display_text_list(array_unique($test_titles));
|
||||
}
|
||||
echo PHP_EOL;
|
||||
@@ -161,7 +173,7 @@ class info implements pts_option_interface
|
||||
else if($o instanceof pts_virtual_test_suite)
|
||||
{
|
||||
pts_client::$display->generic_heading($o->get_title());
|
||||
echo 'Virtual Suite Description: ' . $o->get_description() . PHP_EOL . PHP_EOL;
|
||||
echo pts_client::cli_just_bold('Virtual Suite Description: ') . $o->get_description() . PHP_EOL . PHP_EOL;
|
||||
|
||||
foreach($o->get_contained_test_profiles() as $test_profile)
|
||||
{
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2008 - 2012, Phoronix Media
|
||||
Copyright (C) 2008 - 2012, Michael Larabel
|
||||
Copyright (C) 2008 - 2017, Phoronix Media
|
||||
Copyright (C) 2008 - 2017, 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
|
||||
@@ -32,7 +32,8 @@ class list_test_usage implements pts_option_interface
|
||||
|
||||
if(count($installed_tests) > 0)
|
||||
{
|
||||
echo sprintf('%-18ls %-8ls %-13ls %-11ls %-13ls %-10ls', 'TEST', 'VERSION', 'INSTALL DATE', 'LAST RUN', 'AVG RUN-TIME', 'TIMES RUN') . PHP_EOL;
|
||||
echo sprintf('%-32ls %-12ls %-11ls %-8ls %-6ls', 'TEST', 'INSTALL', 'LAST RUN', 'AVERAGE', 'TIMES') . PHP_EOL;
|
||||
echo sprintf('%-32ls %-12ls %-11ls %-8ls %-6ls', '', 'DATE', 'DATE', 'RUNTIME', 'RUN') . PHP_EOL;
|
||||
foreach($installed_tests as $identifier)
|
||||
{
|
||||
$test_profile = new pts_test_profile($identifier);
|
||||
@@ -45,7 +46,7 @@ class list_test_usage implements pts_option_interface
|
||||
$last_run = $test_profile->test_installation->get_last_run_date();
|
||||
$last_run = $last_run == '0000-00-00' ? 'NEVER' : $last_run;
|
||||
|
||||
echo sprintf('%-18ls - %-8ls %-13ls %-11ls %-13ls %-10ls', $identifier, $test_profile->test_installation->get_installed_version(), $test_profile->test_installation->get_install_date(), $last_run, $avg_time, $test_profile->test_installation->get_run_count()) . PHP_EOL;
|
||||
echo sprintf('%-32ls %-12ls %-11ls %-8ls %-6ls', $identifier, $test_profile->test_installation->get_install_date(), $last_run, $avg_time, $test_profile->test_installation->get_run_count()) . PHP_EOL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
46
pts-core/commands/network_info.php
Normal file
46
pts-core/commands/network_info.php
Normal file
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2016, Phoronix Media
|
||||
Copyright (C) 2016, 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 network_info implements pts_option_interface
|
||||
{
|
||||
const doc_section = 'User Configuration';
|
||||
const doc_description = 'This option will print information detected by the Phoronix Test Suite around the system\'s network configuration.';
|
||||
|
||||
public static function run($r)
|
||||
{
|
||||
$table = array();
|
||||
$table[] = array('Local IP:', pts_network::get_local_ip());
|
||||
$table[] = array('Network MAC: ', pts_network::get_network_mac());
|
||||
$table[] = array('Wake On LAN: ', implode(' ', pts_network::get_network_wol()));
|
||||
|
||||
if(pts_network::get_network_proxy() != false)
|
||||
{
|
||||
foreach(pts_network::get_network_proxy() as $item => $val)
|
||||
$table[] = array('Proxy ' . $item, $val);
|
||||
}
|
||||
$table[] = array('Can Reach Phoronix-Test-Suite.com:', pts_network::http_get_contents('http://www.phoronix-test-suite.com/PTS') == 'PTS' ? 'YES' : 'NO');
|
||||
$table[] = array('Can Reach OpenBenchmarking.org:', pts_network::http_get_contents('http://openbenchmarking.org/PTS') == 'PTS' ? 'YES' : 'NO');
|
||||
echo PHP_EOL . pts_user_io::display_text_table($table, null, 0) . PHP_EOL;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -3,8 +3,8 @@
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2009 - 2011, Phoronix Media
|
||||
Copyright (C) 2009 - 2011, Michael Larabel
|
||||
Copyright (C) 2009 - 2017, Phoronix Media
|
||||
Copyright (C) 2009 - 2017, 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,7 +22,7 @@
|
||||
|
||||
class network_setup implements pts_option_interface
|
||||
{
|
||||
const doc_section = 'Other';
|
||||
const doc_section = 'User Configuration';
|
||||
const doc_description = 'This option allows the user to configure how the Phoronix Test Suite connects to OpenBenchmarking.org and other web-services. Connecting through an HTTP proxy can be configured through this option.';
|
||||
|
||||
public static function run($r)
|
||||
@@ -36,15 +36,26 @@ class network_setup implements pts_option_interface
|
||||
|
||||
$proxy_address = pts_user_io::prompt_user_input('Enter IP address / server name of proxy');
|
||||
$proxy_port = pts_user_io::prompt_user_input('Enter TCP port for proxy server');
|
||||
$proxy_user = pts_user_io::prompt_user_input('Enter user-name for proxy (leave blank if irrelevant)', true);
|
||||
if(!empty($proxy_user))
|
||||
{
|
||||
$proxy_password = pts_strings::str_to_hex(pts_user_io::prompt_user_input('Enter password for proxy', true, true));
|
||||
}
|
||||
else
|
||||
{
|
||||
$proxy_password = null;
|
||||
}
|
||||
|
||||
echo PHP_EOL . 'Testing Proxy Server (' . $proxy_address . ':' . $proxy_port . ')' . PHP_EOL;
|
||||
|
||||
if(pts_network::http_get_contents('http://www.phoronix-test-suite.com/PTS', $proxy_address, $proxy_port) == 'PTS')
|
||||
if(pts_network::http_get_contents('http://www.phoronix-test-suite.com/PTS', $proxy_address, $proxy_port, $proxy_user, $proxy_password) == 'PTS')
|
||||
{
|
||||
echo PHP_EOL . 'Proxy Setup Completed; Storing Network Settings.' . PHP_EOL;
|
||||
pts_config::user_config_generate(array(
|
||||
'PhoronixTestSuite/Options/Networking/ProxyAddress' => $proxy_address,
|
||||
'PhoronixTestSuite/Options/Networking/ProxyPort' => $proxy_port
|
||||
'PhoronixTestSuite/Options/Networking/ProxyPort' => $proxy_port,
|
||||
'PhoronixTestSuite/Options/Networking/ProxyUser' => $proxy_user,
|
||||
'PhoronixTestSuite/Options/Networking/ProxyPassword' => $proxy_password
|
||||
));
|
||||
}
|
||||
else
|
||||
|
||||
@@ -363,7 +363,7 @@ var_dump($server_response);
|
||||
{
|
||||
$gl_usage[$line]++;
|
||||
}
|
||||
else if(ctype_alnum($line))
|
||||
else if(pts_strings::is_alnum($line))
|
||||
{
|
||||
$gl_usage[$line] = 1;
|
||||
}
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2008 - 2015, Phoronix Media
|
||||
Copyright (C) 2008 - 2015, Michael Larabel
|
||||
Copyright (C) 2008 - 2017, Phoronix Media
|
||||
Copyright (C) 2008 - 2017, 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
|
||||
@@ -32,10 +32,8 @@ class openbenchmarking_login implements pts_option_interface
|
||||
public static function run($r)
|
||||
{
|
||||
echo PHP_EOL . 'If you have not already registered for your free OpenBenchmarking.org account, you can do so at http://openbenchmarking.org/' . PHP_EOL . PHP_EOL . 'Once you have registered your account and clicked the link within the verification email, enter your log-in information below.' . PHP_EOL . PHP_EOL;
|
||||
echo 'User-Name: ';
|
||||
$username = pts_user_io::read_user_input();
|
||||
echo 'Password: ';
|
||||
$password = pts_user_io::read_user_input();
|
||||
$username = pts_user_io::prompt_user_input('OpenBenchmarking.org User-Name');
|
||||
$password = pts_user_io::prompt_user_input('OpenBenchmarking.org Password', false, true);
|
||||
|
||||
$login_payload = array(
|
||||
's_u' => $username,
|
||||
|
||||
@@ -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 - 2016, Phoronix Media
|
||||
Copyright (C) 2009 - 2016, 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
|
||||
@@ -33,6 +33,12 @@ class result_file_to_pdf implements pts_option_interface
|
||||
}
|
||||
public static function run($r)
|
||||
{
|
||||
if(!function_exists('getimagesizefromstring'))
|
||||
{
|
||||
echo 'PHP GD support is required for this command.' . PHP_EOL . PHP_EOL;
|
||||
return false;
|
||||
}
|
||||
|
||||
$_REQUEST['force_format'] = 'PNG'; // Force to PNG renderer
|
||||
$_REQUEST['svg_dom_gd_no_interlacing'] = true; // Otherwise FPDF will fail
|
||||
$tdir = pts_client::create_temporary_directory();
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2008 - 2012, Phoronix Media
|
||||
Copyright (C) 2008 - 2012, Michael Larabel
|
||||
Copyright (C) 2008 - 2017, Phoronix Media
|
||||
Copyright (C) 2008 - 2017, 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,7 +44,15 @@ class show_result implements pts_option_interface
|
||||
pts_client::generate_result_file_graphs($r[0], PTS_SAVE_RESULTS_PATH . $r[0] . '/');
|
||||
}
|
||||
|
||||
pts_client::display_web_page($URL . '/index.html', null, false, true);
|
||||
if(pts_client::read_env('DISPLAY') == false)
|
||||
{
|
||||
$rf = new pts_result_file($r[0]);
|
||||
echo pts_result_file_output::result_file_to_text($rf, pts_client::terminal_width());
|
||||
}
|
||||
else
|
||||
{
|
||||
pts_client::display_web_page($URL . '/index.html', null, false, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2014 - 2015, Phoronix Media
|
||||
Copyright (C) 2014 - 2015, Michael Larabel
|
||||
Copyright (C) 2014 - 2016, Phoronix Media
|
||||
Copyright (C) 2014 - 2016, 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,15 @@ class start_phoromatic_server implements pts_option_interface
|
||||
|
||||
$server_launcher = '#!/bin/sh' . PHP_EOL;
|
||||
$web_port = 0;
|
||||
$remote_access = pts_config::read_user_config('PhoronixTestSuite/Options/Server/RemoteAccessPort', 'RANDOM');
|
||||
$remote_access_override = getenv('PHOROMATIC_HTTP_PORT');
|
||||
if($remote_access_override && is_numeric($remote_access_override) && $remote_access_override > 1)
|
||||
{
|
||||
$remote_access = $remote_access_override;
|
||||
}
|
||||
else
|
||||
{
|
||||
$remote_access = pts_config::read_user_config('PhoronixTestSuite/Options/Server/RemoteAccessPort', 'RANDOM');
|
||||
}
|
||||
|
||||
$fp = false;
|
||||
$errno = null;
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2015 - 2016, Phoronix Media
|
||||
Copyright (C) 2015 - 2016, Michael Larabel
|
||||
Copyright (C) 2015 - 2017, Phoronix Media
|
||||
Copyright (C) 2015 - 2017, 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 stress_run implements pts_option_interface
|
||||
|
||||
$tests_to_run_concurrently = 2;
|
||||
|
||||
echo PHP_EOL . 'STRESS-RUN ENVIRONMENT VARIABLES:' . PHP_EOL;
|
||||
echo PHP_EOL . pts_client::cli_just_bold('STRESS-RUN ENVIRONMENT VARIABLES:') . PHP_EOL;
|
||||
|
||||
if(($j = getenv('PTS_CONCURRENT_TEST_RUNS')) && is_numeric($j) && $j > 1)
|
||||
{
|
||||
@@ -54,7 +54,7 @@ class stress_run implements pts_option_interface
|
||||
}
|
||||
else
|
||||
{
|
||||
echo PHP_EOL . 'PTS_CONCURRENT_TEST_RUNS: Set the PTS_CONCURRENT_TEST_RUNS environment variable to specify how many tests should be run concurrently during the stress-run process. If not specified, defaults to 2.' . PHP_EOL . PHP_EOL;
|
||||
echo PHP_EOL . pts_client::cli_just_bold('PTS_CONCURRENT_TEST_RUNS:') . ' Set the PTS_CONCURRENT_TEST_RUNS environment variable to specify how many tests should be run concurrently during the stress-run process. If not specified, defaults to 2.' . PHP_EOL . PHP_EOL;
|
||||
}
|
||||
|
||||
// Run the actual tests
|
||||
@@ -70,7 +70,7 @@ class stress_run implements pts_option_interface
|
||||
}
|
||||
else
|
||||
{
|
||||
echo PHP_EOL . 'TOTAL_LOOP_TIME: Set the TOTAL_LOOP_TIME environment variable if wishing to specify (in minutes) how long to run the stress-run process.' . PHP_EOL . PHP_EOL;
|
||||
echo PHP_EOL . pts_client::cli_just_bold('TOTAL_LOOP_TIME:') . ' Set the TOTAL_LOOP_TIME environment variable if wishing to specify (in minutes) how long to run the stress-run process.' . PHP_EOL . PHP_EOL;
|
||||
$total_loop_time = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2008 - 2011, Phoronix Media
|
||||
Copyright (C) 2008 - 2011, Michael Larabel
|
||||
Copyright (C) 2008 - 2017, Phoronix Media
|
||||
Copyright (C) 2008 - 2017, 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,8 +28,7 @@ class system_info implements pts_option_interface
|
||||
public static function run($r)
|
||||
{
|
||||
pts_client::$display->generic_heading('System Information');
|
||||
echo 'Hardware:' . PHP_EOL . phodevi::system_hardware(true) . PHP_EOL . PHP_EOL;
|
||||
echo 'Software:' . PHP_EOL . phodevi::system_software(true) . PHP_EOL . PHP_EOL;
|
||||
echo phodevi::system_centralized_view();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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 - 2017, Phoronix Media
|
||||
Copyright (C) 2009 - 2017, 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
|
||||
@@ -27,7 +27,8 @@ class system_sensors implements pts_option_interface
|
||||
|
||||
public static function run($r)
|
||||
{
|
||||
pts_client::$display->generic_heading('Supported Sensors');
|
||||
pts_client::$display->generic_heading('Supported Sensors For This System');
|
||||
$tabled = array();
|
||||
foreach(phodevi::supported_sensors() as $sensor)
|
||||
{
|
||||
$supported_devices = call_user_func(array($sensor[2], 'get_supported_devices'));
|
||||
@@ -39,30 +40,26 @@ class system_sensors implements pts_option_interface
|
||||
|
||||
foreach($supported_devices as $device)
|
||||
{
|
||||
self::print_sensor($sensor, $device);
|
||||
if($sensor[0] === 'cgroup')
|
||||
{
|
||||
// echo '- ' . phodevi::sensor_name($sensor) . PHP_EOL;
|
||||
}
|
||||
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'));
|
||||
}
|
||||
}
|
||||
}
|
||||
echo pts_user_io::display_text_table($tabled) . PHP_EOL;
|
||||
|
||||
pts_client::$display->generic_heading('Unsupported Sensors');
|
||||
pts_client::$display->generic_heading('Unsupported Sensors For This System');
|
||||
foreach(phodevi::unsupported_sensors() as $sensor)
|
||||
{
|
||||
echo '- ' . phodevi::sensor_name($sensor) . PHP_EOL;
|
||||
}
|
||||
echo PHP_EOL;
|
||||
}
|
||||
|
||||
private static function print_sensor($sensor, $device)
|
||||
{
|
||||
if($sensor[0] === 'cgroup')
|
||||
{
|
||||
echo '- ' . phodevi::sensor_name($sensor) . PHP_EOL;
|
||||
}
|
||||
else
|
||||
{
|
||||
$sensor_object = new $sensor[2](0, $device);
|
||||
echo '- ' . phodevi::sensor_object_name($sensor_object) . ': ' . phodevi::read_sensor($sensor_object) . ' ' . phodevi::read_sensor_object_unit($sensor_object) . PHP_EOL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
61
pts-core/commands/unload_module.php
Normal file
61
pts-core/commands/unload_module.php
Normal file
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2017, Phoronix Media
|
||||
Copyright (C) 2017, 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 unload_module implements pts_option_interface
|
||||
{
|
||||
const doc_section = 'Modules';
|
||||
const doc_description = 'This option can be used for easily removing a module from the LoadModules list in the Phoronix Test Suite user configuration file. That list controls what modules are automatically loaded on start-up of the Phoronix Test Suite.';
|
||||
|
||||
public static function run($r)
|
||||
{
|
||||
$loaded_modules = pts_strings::comma_explode(pts_config::read_user_config('PhoronixTestSuite/Options/Modules/LoadModules', null));
|
||||
echo PHP_EOL . 'Currently Loaded Modules: ' . PHP_EOL;
|
||||
echo pts_user_io::display_text_list($loaded_modules);
|
||||
|
||||
|
||||
if(count($r) == 0 || !in_array($r[0], $loaded_modules))
|
||||
{
|
||||
echo PHP_EOL . 'You must specify a valid module from the list to unload.' . PHP_EOL;
|
||||
echo 'Example: phoronix-test-suite unload-module update_checker' . PHP_EOL;
|
||||
return false;
|
||||
}
|
||||
|
||||
foreach($r as $module_to_unload)
|
||||
{
|
||||
if(($x = array_search($module_to_unload, $loaded_modules)) !== false)
|
||||
{
|
||||
echo PHP_EOL . 'Unloading Module: ' . $module_to_unload . PHP_EOL;
|
||||
unset($loaded_modules[$x]);
|
||||
}
|
||||
else
|
||||
{
|
||||
echo PHP_EOL . 'UNKNOWN: ' . $module_to_unload . PHP_EOL;
|
||||
}
|
||||
}
|
||||
|
||||
$new_options = array('PhoronixTestSuite/Options/Modules/LoadModules' => implode(', ', $loaded_modules));
|
||||
pts_config::user_config_generate($new_options);
|
||||
echo PHP_EOL . 'New user configuration file written.' . PHP_EOL . PHP_EOL;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
class user_config_reset implements pts_option_interface
|
||||
{
|
||||
const doc_section = 'Other';
|
||||
const doc_section = 'User Configuration';
|
||||
const doc_description = 'This option can be used for resetting the Phoronix Test Suite user configuration file to its default state.';
|
||||
|
||||
public static function run($r)
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2009 - 2011, Phoronix Media
|
||||
Copyright (C) 2009 - 2011, Michael Larabel
|
||||
Copyright (C) 2009 - 2017, Phoronix Media
|
||||
Copyright (C) 2009 - 2017, 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,7 +22,7 @@
|
||||
|
||||
class user_config_set implements pts_option_interface
|
||||
{
|
||||
const doc_section = 'Other';
|
||||
const doc_section = 'User Configuration';
|
||||
const doc_description = 'This option can be used for setting an XML value in the Phoronix Test Suite user configuration file.';
|
||||
|
||||
public static function run($r)
|
||||
|
||||
106
pts-core/commands/winners_and_losers.php
Normal file
106
pts-core/commands/winners_and_losers.php
Normal file
@@ -0,0 +1,106 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2017, Phoronix Media
|
||||
Copyright (C) 2017, 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;
|
||||
}
|
||||
public static function invalid_command($passed_args = null)
|
||||
{
|
||||
pts_tests::recently_saved_results();
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -72,13 +72,23 @@ class ubuntu_dependency_handler implements pts_dependency_handler
|
||||
{
|
||||
$apt_output = shell_exec('apt-file -N search --regex "' . $arg . '$" 2>/dev/null');
|
||||
|
||||
if(strpos($apt_output, 'Pattern options:') !== false)
|
||||
{
|
||||
$apt_output = shell_exec('apt-file --regexp search "' . $arg . '$" 2>/dev/null');
|
||||
}
|
||||
|
||||
foreach(explode(PHP_EOL, $apt_output) as $line)
|
||||
{
|
||||
if(($x = strpos($line, ': ')) == false)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
return trim(substr($line, 0, $x));
|
||||
$proposed = trim(substr($line, 0, $x));
|
||||
if(strpos($proposed, '[') !== false || strpos($proposed, ']') !== false)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
return $proposed;
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
echo "Please enter your root password below:" 1>&2
|
||||
|
||||
if [ -x /usr/bin/zypper ]; then
|
||||
su root -c "zypper install -l -y --force-resolution $*"
|
||||
su root -c "zypper install -l -y -n --force-resolution $*"
|
||||
else
|
||||
su root -c "yast -i $*"
|
||||
fi
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Pardus package installation
|
||||
# Solus package installation
|
||||
|
||||
echo "Please enter your root password below:" 1>&2
|
||||
su root -c "pisi install --ignore-safety --yes-all $*"
|
||||
sudo eopkg install --yes-all $*
|
||||
exit
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#!/bin/sh
|
||||
if [ `whoami` != "root" ] && [ ! -z "$DISPLAY" ]; then
|
||||
if [ `whoami` = "root" ] && [ ! -w /usr/bin/sudo ]; then
|
||||
apt-get -y --ignore-missing install $*
|
||||
elif [ `whoami` != "root" ] && [ ! -z "$DISPLAY" ]; then
|
||||
if [ -x /usr/bin/gksudo ]; then
|
||||
ROOT="/usr/bin/gksudo"
|
||||
elif [ -x /usr/bin/kdesudo ]; then
|
||||
|
||||
@@ -68,6 +68,10 @@
|
||||
<GenericName>java</GenericName>
|
||||
<PackageName>java-common</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>maven</GenericName>
|
||||
<PackageName>maven</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>portaudio-development</GenericName>
|
||||
<PackageName>portaudio</PackageName>
|
||||
@@ -172,6 +176,10 @@
|
||||
<GenericName>yasm</GenericName>
|
||||
<PackageName>yasm</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>nasm</GenericName>
|
||||
<PackageName>nasm</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>gmp-library</GenericName>
|
||||
<PackageName>gmp</PackageName>
|
||||
|
||||
@@ -42,9 +42,13 @@
|
||||
<GenericName>imlib2-development</GenericName>
|
||||
<PackageName>libimlib2-dev</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>nasm</GenericName>
|
||||
<PackageName>nasm</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>java</GenericName>
|
||||
<PackageName>openjdk-6-jdk</PackageName>
|
||||
<PackageName>openjdk-8-jdk</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>portaudio-development</GenericName>
|
||||
|
||||
@@ -6,6 +6,11 @@
|
||||
<Name>Arch Linux</Name>
|
||||
<PackageManager>pacman</PackageManager>
|
||||
</Information>
|
||||
<Package>
|
||||
<GenericName>common-dependencies</GenericName>
|
||||
<PackageName>mesa-demos</PackageName>
|
||||
<FileCheck>glxinfo</FileCheck>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>gtk-development</GenericName>
|
||||
<PackageName>gtk2</PackageName>
|
||||
@@ -22,10 +27,18 @@
|
||||
<GenericName>glut</GenericName>
|
||||
<PackageName>freeglut</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>vulkan-development</GenericName>
|
||||
<PackageName>vulkan-icd-loader</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>pcre</GenericName>
|
||||
<PackageName>pcre</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>nasm</GenericName>
|
||||
<PackageName>nasm</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>libpng-development</GenericName>
|
||||
<PackageName>libpng</PackageName>
|
||||
@@ -65,7 +78,11 @@
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>java</GenericName>
|
||||
<PackageName>openjdk6</PackageName>
|
||||
<PackageName>jdk8-openjdk</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>maven</GenericName>
|
||||
<PackageName>maven</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>portaudio-development</GenericName>
|
||||
@@ -73,7 +90,7 @@
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>fortran-compiler</GenericName>
|
||||
<PackageName>gcc-fortran-multilib</PackageName>
|
||||
<PackageName>gcc-fortran</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>glew</GenericName>
|
||||
|
||||
@@ -19,6 +19,14 @@
|
||||
<GenericName>sdl2-development</GenericName>
|
||||
<PackageName>SDL2</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>java</GenericName>
|
||||
<PackageName>java/openjdk8</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>maven</GenericName>
|
||||
<PackageName>maven</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>libpng-development</GenericName>
|
||||
<PackageName>png</PackageName>
|
||||
@@ -31,6 +39,10 @@
|
||||
<GenericName>build-utilities</GenericName>
|
||||
<PackageName>autoconf</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>nasm</GenericName>
|
||||
<PackageName>nasm</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>pcre</GenericName>
|
||||
<PackageName>pcre</PackageName>
|
||||
@@ -109,7 +121,7 @@
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>python</GenericName>
|
||||
<PackageName>python3</PackageName>
|
||||
<PackageName>python3 python</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>yasm</GenericName>
|
||||
@@ -147,5 +159,13 @@
|
||||
<GenericName>httpd</GenericName>
|
||||
<PackageName>apache</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>python-sklearn</GenericName>
|
||||
<PackageName>py27-scikit-learn</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>python-scipy</GenericName>
|
||||
<PackageName>py27-scipy</PackageName>
|
||||
</Package>
|
||||
</ExternalDependencies>
|
||||
</PhoronixTestSuite>
|
||||
|
||||
@@ -33,6 +33,14 @@
|
||||
<GenericName>glut</GenericName>
|
||||
<PackageName>freeglut-devel</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>nasm</GenericName>
|
||||
<PackageName>nasm</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>vulkan-development</GenericName>
|
||||
<PackageName>vulkan-devel</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>openssl-development</GenericName>
|
||||
<PackageName>openssl-devel</PackageName>
|
||||
@@ -52,6 +60,7 @@
|
||||
<Package>
|
||||
<GenericName>build-utilities</GenericName>
|
||||
<PackageName>gcc gcc-c++ make autoconf automake glibc-static patch</PackageName>
|
||||
<FileCheck>gcc, c++</FileCheck>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>xorg-development</GenericName>
|
||||
@@ -73,6 +82,10 @@
|
||||
<GenericName>java</GenericName>
|
||||
<PackageName>java-openjdk</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>maven</GenericName>
|
||||
<PackageName>maven</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>portaudio-development</GenericName>
|
||||
<PackageName>portaudio-devel</PackageName>
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>java</GenericName>
|
||||
<PackageName>java/openjdk7</PackageName>
|
||||
<PackageName>java/openjdk8</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>pcre</GenericName>
|
||||
|
||||
@@ -37,6 +37,12 @@
|
||||
<PossibleNames>freeglut3-dev, freeglut-devel</PossibleNames>
|
||||
<FileCheck>libglut.so.3, GL/glut.h</FileCheck>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>vulkan-development</GenericName>
|
||||
<Title>Vulkan Development</Title>
|
||||
<PossibleNames>libvulkan-dev, vulkan-devel</PossibleNames>
|
||||
<FileCheck>vulkan/vulkan.h, libvulkan.so.1</FileCheck>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>csh</GenericName>
|
||||
<Title>CSH</Title>
|
||||
@@ -71,7 +77,7 @@
|
||||
<GenericName>xorg-development</GenericName>
|
||||
<Title>X.Org Development Files and Libraries</Title>
|
||||
<PossibleNames>xserver-xorg-development, xorg-devel</PossibleNames>
|
||||
<FileCheck>xorg/xf86.h</FileCheck>
|
||||
<FileCheck>xorg/xf86.h OR X11/Xlib.h</FileCheck>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>cairo-development</GenericName>
|
||||
@@ -112,9 +118,15 @@
|
||||
<Package>
|
||||
<GenericName>java</GenericName>
|
||||
<Title>Java Runtime Environment</Title>
|
||||
<PossibleNames>java-openjdk, icedtea, java, sun-java</PossibleNames>
|
||||
<PossibleNames>java-openjdk, java, sun-java</PossibleNames>
|
||||
<FileCheck>java OR jvm OR /usr/lib64/jvm</FileCheck>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>maven</GenericName>
|
||||
<Title>Apache Maven</Title>
|
||||
<PossibleNames>maven</PossibleNames>
|
||||
<FileCheck>maven OR mvn</FileCheck>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>portaudio-development</GenericName>
|
||||
<Title>PortAudio Development Files</Title>
|
||||
@@ -269,7 +281,7 @@
|
||||
<GenericName>blas-development</GenericName>
|
||||
<Title>Basic Linear Algebra Sub-Routine Library</Title>
|
||||
<PossibleNames>libblas-dev, libblas-devel, blas-devel, blas</PossibleNames>
|
||||
<FileCheck>libblas.so</FileCheck>
|
||||
<FileCheck>libblas.so OR openblas_config.h</FileCheck>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>lapack-development</GenericName>
|
||||
@@ -287,7 +299,7 @@
|
||||
<GenericName>openmpi-development</GenericName>
|
||||
<Title>OpenMPI</Title>
|
||||
<PossibleNames>libopenmpi-dev, openmpi-bin</PossibleNames>
|
||||
<FileCheck>openmpi/lib/libmpi.so, mpirun.openmpi</FileCheck>
|
||||
<FileCheck>openmpi/lib/libmpi.so OR mpirun.openmpi OR /usr/lib64/mpi OR /usr/include/openmpi</FileCheck>
|
||||
</Package>
|
||||
|
||||
<Package>
|
||||
@@ -350,6 +362,12 @@
|
||||
<PossibleNames>yasm</PossibleNames>
|
||||
<FileCheck>yasm</FileCheck>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>nasm</GenericName>
|
||||
<Title>Nasm Assembler</Title>
|
||||
<PossibleNames>nasm</PossibleNames>
|
||||
<FileCheck>nasm</FileCheck>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>lib3ds</GenericName>
|
||||
<Title>AutoDesk 3DS File Support</Title>
|
||||
|
||||
@@ -22,6 +22,10 @@
|
||||
<GenericName>glut</GenericName>
|
||||
<PackageName>virtual/glut</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>vulkan-development</GenericName>
|
||||
<PackageName>media-libs/vulkan-loder</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>openssl-development</GenericName>
|
||||
<PackageName>dev-libs/openssl</PackageName>
|
||||
@@ -64,7 +68,19 @@
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>java</GenericName>
|
||||
<PackageName>virtual/jre</PackageName>
|
||||
<PackageName>virtual/jdk</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>maven</GenericName>
|
||||
<PackageName>dev-lang/maven-bin</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>maven</GenericName>
|
||||
<PackageName>maven</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>nasm</GenericName>
|
||||
<PackageName>dev-lang/nasm</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>portaudio-development</GenericName>
|
||||
|
||||
@@ -36,6 +36,10 @@
|
||||
<GenericName>libpng-development</GenericName>
|
||||
<PackageName>libpng</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>nasm</GenericName>
|
||||
<PackageName>nasm</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>openssl-development</GenericName>
|
||||
<PackageName>openssl</PackageName>
|
||||
@@ -62,7 +66,11 @@
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>java</GenericName>
|
||||
<PackageName>openjdk6</PackageName>
|
||||
<PackageName>openjdk8</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>maven</GenericName>
|
||||
<PackageName>maven</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>portaudio-development</GenericName>
|
||||
|
||||
@@ -35,6 +35,10 @@
|
||||
<GenericName>p7zip</GenericName>
|
||||
<PackageName>p7zip</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>nasm</GenericName>
|
||||
<PackageName>nasm</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>csh</GenericName>
|
||||
<PackageName>tcsh</PackageName>
|
||||
@@ -72,6 +76,10 @@
|
||||
<GenericName>java</GenericName>
|
||||
<PackageName>java</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>maven</GenericName>
|
||||
<PackageName>maven</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>portaudio-development</GenericName>
|
||||
<PackageName>portaudio-devel</PackageName>
|
||||
|
||||
@@ -36,6 +36,10 @@
|
||||
<GenericName>csh</GenericName>
|
||||
<PackageName>tcsh</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>nasm</GenericName>
|
||||
<PackageName>nasm</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>pcre</GenericName>
|
||||
<PackageName>pcre-devel</PackageName>
|
||||
@@ -75,9 +79,13 @@
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>java</GenericName>
|
||||
<PackageName>java-1_6_0-openjdk</PackageName>
|
||||
<PackageName>java-1_8_0-openjdk</PackageName>
|
||||
<FileCheck>/usr/lib/jvm/ OR /usr/lib64/jvm/</FileCheck>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>maven</GenericName>
|
||||
<PackageName>maven</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>portaudio-development</GenericName>
|
||||
<PackageName>portaudio-devel</PackageName>
|
||||
@@ -176,7 +184,7 @@
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>lapack-development</GenericName>
|
||||
<PackageName>lapack-devel</PackageName>
|
||||
<PackageName>lapack-devel lapacke-devel</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>cmake</GenericName>
|
||||
@@ -190,6 +198,10 @@
|
||||
<GenericName>bzip2-development</GenericName>
|
||||
<PackageName>libbz2-devel</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>vulkan-development</GenericName>
|
||||
<PackageName>vulkan</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>tcl</GenericName>
|
||||
<PackageName>tcl</PackageName>
|
||||
@@ -204,7 +216,7 @@
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>atlas-development</GenericName>
|
||||
<PackageName>libatlas3-devel</PackageName>
|
||||
<PackageName>blas-devel</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>openmpi-development</GenericName>
|
||||
@@ -250,6 +262,10 @@
|
||||
<GenericName>tinyxml</GenericName>
|
||||
<PackageName>tinyxml-devel</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>opencl</GenericName>
|
||||
<PackageName>opencl-headers</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>attr</GenericName>
|
||||
<PackageName>attr</PackageName>
|
||||
@@ -278,9 +294,5 @@
|
||||
<GenericName>python-scipy</GenericName>
|
||||
<PackageName>python-scipy</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>python-sklearn</GenericName>
|
||||
<PackageName>scikit-learn</PackageName>
|
||||
</Package>
|
||||
</ExternalDependencies>
|
||||
</PhoronixTestSuite>
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>java</GenericName>
|
||||
<PackageName>java-1.6.0-sun</PackageName>
|
||||
<PackageName>java-1.8.0-sun</PackageName>
|
||||
<FileCheck>/usr/bin/java</FileCheck>
|
||||
</Package>
|
||||
<Package>
|
||||
|
||||
@@ -5,8 +5,17 @@
|
||||
<Information>
|
||||
<Name>Solus</Name>
|
||||
<Aliases>Solus Linux</Aliases>
|
||||
<PackageManager>pisi</PackageManager>
|
||||
<PackageManager>eopkg</PackageManager>
|
||||
</Information>
|
||||
<Package>
|
||||
<GenericName>common-dependencies</GenericName>
|
||||
<PackageName>mesalib-demos unzip</PackageName>
|
||||
<FileCheck>glxinfo, unzip</FileCheck>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>32bit-compatibility</GenericName>
|
||||
<PackageName>glibc-32bit libstdc++-32bit libx11-32bit libxext-32bit libxrandr-32bit libxinerama-32bit libxdamage-32bit-devel mesalib-32bit-devel sdl1-sound-32bit libjpeg-turbo-32bit systemd-32bit</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>gtk-development</GenericName>
|
||||
<PackageName>libgtk-2-devel</PackageName>
|
||||
@@ -17,16 +26,12 @@
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>sdl-development</GenericName>
|
||||
<PackageName>sdl1-devel sdl1-image-devel sdl1-ttf-devel sdl1-gfx-devel sdl1-image-devel</PackageName>
|
||||
<PackageName>sdl1-devel sdl1-image-devel sdl2-ttf-devel sdl-gfx-devel sdl1-image-devel sdl1-net-devel sdl1-mixer-devel</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>glut</GenericName>
|
||||
<PackageName>freeglut-devel</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>csh</GenericName>
|
||||
<PackageName>zsh</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>libpng-development</GenericName>
|
||||
<PackageName>libpng-devel</PackageName>
|
||||
@@ -35,9 +40,13 @@
|
||||
<GenericName>openssl-development</GenericName>
|
||||
<PackageName>openssl-devel</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>nasm</GenericName>
|
||||
<PackageName>nasm</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>build-utilities</GenericName>
|
||||
<PackageName>gcc g++ libgomp autoconf automake m4 glibc-devel binutils make</PackageName>
|
||||
<PackageName>-c system.devel</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>tiff</GenericName>
|
||||
@@ -55,6 +64,14 @@
|
||||
<GenericName>imlib2-development</GenericName>
|
||||
<PackageName>imlib2-devel</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>java</GenericName>
|
||||
<PackageName>openjdk-8</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>maven</GenericName>
|
||||
<PackageName>maven</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>portaudio-development</GenericName>
|
||||
<PackageName>portaudio-devel</PackageName>
|
||||
@@ -75,13 +92,18 @@
|
||||
<GenericName>scons</GenericName>
|
||||
<PackageName>scons</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>smartmontools</GenericName>
|
||||
<PackageName>smartmontools</PackageName>
|
||||
<FileCheck>/usr/sbin/smartctl</FileCheck>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>zlib-development</GenericName>
|
||||
<PackageName>zlib-devel</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>jpeg-development</GenericName>
|
||||
<PackageName>openjpeg-devel</PackageName>
|
||||
<PackageName>libjpeg-turbo-devel</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>libaio-development</GenericName>
|
||||
@@ -96,8 +118,8 @@
|
||||
<PackageName>perl perl-module-build</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>libstdcpp5</GenericName>
|
||||
<PackageName>libstdc++</PackageName>
|
||||
<GenericName>xorg-video</GenericName>
|
||||
<PackageName>libxv-devel libxvmc-devel libvdpau-devel</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>openal-development</GenericName>
|
||||
@@ -107,10 +129,18 @@
|
||||
<GenericName>vorbis-development</GenericName>
|
||||
<PackageName>libvorbis-devel</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>jam</GenericName>
|
||||
<PackageName>ftjam</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>p7zip</GenericName>
|
||||
<PackageName>p7zip</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>qt4-development</GenericName>
|
||||
<PackageName>qt4-devel</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>autoconf</GenericName>
|
||||
<PackageName>autoconf</PackageName>
|
||||
@@ -129,15 +159,26 @@
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>curl</GenericName>
|
||||
<PackageName>curl-devel curl</PackageName>
|
||||
<PackageName>curl-devel</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>fftw3-development</GenericName>
|
||||
<PackageName>fftw-devel</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>blas-development</GenericName>
|
||||
<PackageName>openblas-devel</PackageName>
|
||||
<FileCheck>openblas_config.h</FileCheck>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>lapack-development</GenericName>
|
||||
<PackageName>lapack-devel</PackageName>
|
||||
<PackageName>openblas-devel</PackageName>
|
||||
<FileCheck>lapacke.h</FileCheck>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>atlas-development</GenericName>
|
||||
<PackageName>gflags-devel glog-devel leveldb-devel lmdb-devel hdf5-devel opencv-devel protobuf-devel snappy-devel</PackageName>
|
||||
<FileCheck>gflags.h</FileCheck>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>cmake</GenericName>
|
||||
@@ -155,10 +196,23 @@
|
||||
<GenericName>tcl</GenericName>
|
||||
<PackageName>tcl</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>glibc-development</GenericName>
|
||||
<PackageName>glibc-devel</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>python</GenericName>
|
||||
<PackageName>python</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>boost-thread-development</GenericName>
|
||||
<PackageName>libboost-devel</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>python-numpy</GenericName>
|
||||
<PackageName>numpy</PackageName>
|
||||
<FileCheck>/usr/lib/python2.7/site-packages/numpy</FileCheck>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>yasm</GenericName>
|
||||
<PackageName>yasm</PackageName>
|
||||
@@ -173,19 +227,51 @@
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>git</GenericName>
|
||||
<PackageName>git-core</PackageName>
|
||||
<PackageName>git</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>suitesparse</GenericName>
|
||||
<PackageName>suitesparse-devel</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>tinyxml</GenericName>
|
||||
<PackageName>tinyxml-devel</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>opencl</GenericName>
|
||||
<PackageName>ocl-icd-devel</PackageName>
|
||||
<FileCheck>ocl_icd.h</FileCheck>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>attr</GenericName>
|
||||
<PackageName>attr-devel</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<Package>
|
||||
<GenericName>golang</GenericName>
|
||||
<PackageName>golang golang-binary</PackageName>
|
||||
<PackageName>golang</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>redis-server</GenericName>
|
||||
<PackageName>redis</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>opencv</GenericName>
|
||||
<PackageName>opencv-devel</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>perl-digest-md5</GenericName>
|
||||
<PackageName>perl</PackageName>
|
||||
<FileCheck>/usr/lib/perl5/5.22.1/x86_64-linux/Digest/MD5.pm</FileCheck>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>python-scipy</GenericName>
|
||||
<PackageName>scipy</PackageName>
|
||||
<FileCheck>/usr/lib/python2.7/site-packages/scipy</FileCheck>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>python-sklearn</GenericName>
|
||||
<PackageName>scikit-learn</PackageName>
|
||||
<FileCheck>/usr/lib/python2.7/site-packages/sklearn</FileCheck>
|
||||
</Package>
|
||||
</ExternalDependencies>
|
||||
</PhoronixTestSuite>
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
</Information>
|
||||
<Package>
|
||||
<GenericName>common-dependencies</GenericName>
|
||||
<PackageName>mesa-utils unzip</PackageName>
|
||||
<FileCheck>glxinfo, unzip</FileCheck>
|
||||
<PackageName>mesa-utils unzip apt-file</PackageName>
|
||||
<FileCheck>glxinfo, unzip, apt-file</FileCheck>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>32bit-compatibility</GenericName>
|
||||
@@ -37,6 +37,10 @@
|
||||
<GenericName>sdl-development</GenericName>
|
||||
<PackageName>libsdl1.2-dev libsdl-gfx1.2-dev libsdl-net1.2-dev libsdl-image1.2-dev libsdl-ttf2.0-dev libsdl-mixer1.2-dev</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>vulkan-development</GenericName>
|
||||
<PackageName>vulkan-utils libvulkan-dev</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>glut</GenericName>
|
||||
<PackageName>freeglut3-dev</PackageName>
|
||||
@@ -85,7 +89,11 @@
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>java</GenericName>
|
||||
<PackageName>openjdk-6-jre</PackageName>
|
||||
<PackageName>openjdk-8-jdk</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>maven</GenericName>
|
||||
<PackageName>maven</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>portaudio-development</GenericName>
|
||||
@@ -209,7 +217,7 @@
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>lapack-development</GenericName>
|
||||
<PackageName>liblapack-dev</PackageName>
|
||||
<PackageName>liblapack-dev liblapacke-dev</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>atlas-development</GenericName>
|
||||
|
||||
@@ -32,6 +32,10 @@
|
||||
<GenericName>csh</GenericName>
|
||||
<PackageName>tcsh</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>nasm</GenericName>
|
||||
<PackageName>nasm</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>libpng-development</GenericName>
|
||||
<PackageName>libpng-devel</PackageName>
|
||||
@@ -72,6 +76,10 @@
|
||||
<GenericName>java</GenericName>
|
||||
<PackageName>openjdk</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>maven</GenericName>
|
||||
<PackageName>maven</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>portaudio-development</GenericName>
|
||||
<PackageName>portaudio-devel</PackageName>
|
||||
|
||||
@@ -64,6 +64,10 @@
|
||||
<PackageName>jdk</PackageName>
|
||||
<FileCheck>/usr/bin/java</FileCheck>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>maven</GenericName>
|
||||
<PackageName>maven</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>portaudio-development</GenericName>
|
||||
<PackageName>portaudio</PackageName>
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2008 - 2011, Phoronix Media
|
||||
Copyright (C) 2008 - 2011, Michael Larabel
|
||||
Copyright (C) 2008 - 2016, Phoronix Media
|
||||
Copyright (C) 2008 - 2016, Michael Larabel
|
||||
dummy_module.php: A simple 'dummy' module to demonstrate the PTS functions
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
@@ -120,6 +120,14 @@ class dummy_module extends pts_module_interface
|
||||
{
|
||||
echo PHP_EOL . 'We\'re all done with the testing for now.' . PHP_EOL . 'Called: __post_run_process()' . PHP_EOL;
|
||||
}
|
||||
public static function __test_log_output()
|
||||
{
|
||||
echo PHP_EOL . 'Log file available.' . PHP_EOL . 'Called: __test_log_output()' . PHP_EOL;
|
||||
}
|
||||
public static function __post_test_run_system_logs()
|
||||
{
|
||||
echo PHP_EOL . 'System logs available.' . PHP_EOL . 'Called: __post_test_run_system_logs()' . PHP_EOL;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
130
pts-core/modules/flamegrapher.php
Normal file
130
pts-core/modules/flamegrapher.php
Normal file
@@ -0,0 +1,130 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2016, Phoronix Media
|
||||
Copyright (C) 2016, 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 flamegrapher extends pts_module_interface
|
||||
{
|
||||
const module_name = 'Generate Perf FlameGraphs For Tests';
|
||||
const module_version = '0.1.0';
|
||||
const module_description = 'Setting FLAME_GRAPH_PATH=<path to flamegraph path> will auto-load and enable this Phoronix Test Suite module. The module will generate a Linux perf FlameGraph for each test run during the benchmarking process. Details on FlameGraph @ https://github.com/brendangregg/FlameGraph';
|
||||
const module_author = 'Michael Larabel';
|
||||
|
||||
private static $successful_test_run;
|
||||
private static $flame_graph_path = false;
|
||||
private static $temp_flame_dir;
|
||||
private static $save_position = 0;
|
||||
|
||||
public static function module_environmental_variables()
|
||||
{
|
||||
return array('FLAME_GRAPH_PATH');
|
||||
}
|
||||
public static function module_info()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
public static function __run_manager_setup(&$test_run_manager)
|
||||
{
|
||||
// Verify LINUX_PERF is set, `perf` can be found, and is Linux
|
||||
self::$flame_graph_path = getenv('FLAME_GRAPH_PATH') . '/';
|
||||
|
||||
if(!is_dir(self::$flame_graph_path))
|
||||
{
|
||||
echo 'FLAME_GRAPH_PATH is not valid directory to FlameGraph.' . PHP_EOL;
|
||||
return pts_module::MODULE_UNLOAD;
|
||||
}
|
||||
if(!is_executable(self::$flame_graph_path . 'stackcollapse-perf.pl'))
|
||||
{
|
||||
echo 'stackcollapse-perf.pl not found.' . PHP_EOL;
|
||||
return pts_module::MODULE_UNLOAD;
|
||||
}
|
||||
if(!is_executable(self::$flame_graph_path . 'flamegraph.pl'))
|
||||
{
|
||||
echo 'flamegraph.pl not found.' . PHP_EOL;
|
||||
return pts_module::MODULE_UNLOAD;
|
||||
}
|
||||
if(!pts_client::executable_in_path('perf'))
|
||||
{
|
||||
echo 'Linux perf binary not found.' . PHP_EOL;
|
||||
return pts_module::MODULE_UNLOAD;
|
||||
}
|
||||
if(!pts_client::executable_in_path('perl'))
|
||||
{
|
||||
echo 'Linux perl binary not found.' . PHP_EOL;
|
||||
return pts_module::MODULE_UNLOAD;
|
||||
}
|
||||
|
||||
echo PHP_EOL . 'Linux Perf & FlameGraph Support Enabled.' . PHP_EOL . PHP_EOL;
|
||||
|
||||
// This module won't be too useful if you're not saving the results to see the graphs
|
||||
$test_run_manager->force_results_save();
|
||||
}
|
||||
public static function __pre_test_run(&$test_run_request)
|
||||
{
|
||||
// Pre-run process start perf recording
|
||||
self::$temp_flame_dir = pts_client::create_temporary_directory('flamegraph');
|
||||
shell_exec('perf record -a -g -F 97 -o ' . self::$temp_flame_dir . 'perf.data sleep 3');
|
||||
}
|
||||
public static function __post_test_run_success($test_run_request)
|
||||
{
|
||||
// Base the new result object/graph off of what just ran
|
||||
// Do the copy here of it since this function is only called when test is a success
|
||||
self::$successful_test_run = clone $test_run_request;
|
||||
}
|
||||
public static function __post_test_run_process(&$result_file)
|
||||
{
|
||||
$svg_flamegraph = null;
|
||||
if(is_dir(self::$temp_flame_dir))
|
||||
{
|
||||
// Post-process perf data with FlameGraph
|
||||
shell_exec('cd ' . self::$temp_flame_dir . ' && perf script > out.stack');
|
||||
shell_exec(self::$flame_graph_path . 'stackcollapse-perf.pl ' . self::$temp_flame_dir . 'out.stack > ' . self::$temp_flame_dir . 'out.folded');
|
||||
shell_exec(self::$flame_graph_path . 'flamegraph.pl ' . self::$temp_flame_dir . 'out.folded > ' . self::$temp_flame_dir . 'out.svg');
|
||||
if(is_file(self::$temp_flame_dir . 'out.svg'))
|
||||
{
|
||||
$svg_flamegraph = file_get_contents(self::$temp_flame_dir . 'out.svg');
|
||||
}
|
||||
|
||||
// Cleanup
|
||||
pts_file_io::delete(self::$temp_flame_dir, null, true);
|
||||
self::$temp_flame_dir = false;
|
||||
}
|
||||
|
||||
if(self::$successful_test_run && $svg_flamegraph)
|
||||
{
|
||||
self::$save_position++;
|
||||
if(!is_dir($result_file->default_result_folder_path() . '/result-graphs'))
|
||||
{
|
||||
pts_file_io::mkdir($result_file->default_result_folder_path() . '/result-graphs', 0777, true);
|
||||
}
|
||||
|
||||
// TODO XXX below is a bit hacky way of saving SVG graphs to make them appear in the local results viewer under matching test
|
||||
$s = file_put_contents($result_file->default_result_folder_path() . '/result-graphs/' . self::$save_position . '_extra1.svg', $svg_flamegraph);
|
||||
if($s)
|
||||
{
|
||||
echo PHP_EOL . 'Saved FlameGraph result to: ' . $result_file->default_result_folder_path() . '/result-graphs/' . self::$save_position . '_extra1.svg' . PHP_EOL;
|
||||
}
|
||||
}
|
||||
|
||||
// Reset to be safe
|
||||
self::$successful_test_run = null;
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -1,167 +0,0 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
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
|
||||
graphics_override.php: Graphics AA/AF image quality setting override module
|
||||
|
||||
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 graphics_event_checker extends pts_module_interface
|
||||
{
|
||||
const module_name = 'Graphics Event Checker';
|
||||
const module_version = '1.0.0';
|
||||
const module_description = 'This module checks a number of events prior to and and after running a test to make sure the graphics sub-system was not put in a sour or unintended state by the application. For instance, it makes sure syncing to vBlank is not forced through the driver and that a graphics test has not left the display in an unintended mode.';
|
||||
const module_author = 'Michael Larabel';
|
||||
|
||||
private static $start_video_resolution = array(-1, -1);
|
||||
private static $driver_forced_vsync = false;
|
||||
|
||||
// GPU Errors
|
||||
static $error_pointer = 0;
|
||||
static $error_count = 0; // Number of GPU errors that were detected
|
||||
static $error_analysis = array(); // Array of error break down. For each array index is for a test where an error happened, it's TEST_NAME => ERROR_COUNT
|
||||
|
||||
public static function __startup()
|
||||
{
|
||||
/*
|
||||
// Right now Phodevi is just using xrandr to set display modes, so if that's not present, this module will be useless
|
||||
if(!pts_client::executable_in_path('xrandr'))
|
||||
{
|
||||
return pts_module::MODULE_UNLOAD;
|
||||
}
|
||||
*/
|
||||
if(count(phodevi_parser::read_xdpy_monitor_info()) > 1)
|
||||
{
|
||||
// No multi-monitor support right now
|
||||
return pts_module::MODULE_UNLOAD;
|
||||
}
|
||||
}
|
||||
public static function __pre_run_process()
|
||||
{
|
||||
self::$error_count = 0;
|
||||
self::$error_pointer = 0;
|
||||
self::$error_analysis = array();
|
||||
|
||||
// Store the video resolution
|
||||
// Access the xrandr resolution directly to ensure it's not polling the FB size or one of the KMS modes
|
||||
self::$start_video_resolution = phodevi_gpu::gpu_xrandr_resolution();
|
||||
|
||||
if(phodevi::is_linux() && phodevi::is_ati_graphics())
|
||||
{
|
||||
$vsync_val = phodevi_linux_parser::read_amd_pcsdb('AMDPCSROOT/SYSTEM/BUSID-*/OpenGL,VSyncControl'); // Check for vSync
|
||||
if($vsync_val == '0x00000002' || $vsync_val == '0x00000003')
|
||||
{
|
||||
self::$driver_forced_vsync = true;
|
||||
}
|
||||
|
||||
//$catalyst_ai_val = phodevi_linux_parser::read_amd_pcsdb('AMDPCSROOT/SYSTEM/BUSID-*/OpenGL,CatalystAI'); // Check for Catalyst AI
|
||||
//if($catalyst_ai_val == '0x00000001' || $catalyst_ai_val == '0x00000002')
|
||||
// echo '\nCatalyst AI is enabled, which will use driver-specific optimizations in some tests that may offer extra performance enhancements.\n';
|
||||
}
|
||||
else if(phodevi::is_nvidia_graphics())
|
||||
{
|
||||
self::$error_pointer = self::nvidia_gpu_error_count(); // Set the error pointer
|
||||
|
||||
if(phodevi_parser::read_nvidia_extension('SyncToVBlank') == '1')
|
||||
{
|
||||
shell_exec('nvidia-settings -a SyncToVBlank=0 2>&1');
|
||||
self::$driver_forced_vsync = true;
|
||||
}
|
||||
}
|
||||
|
||||
if(self::$driver_forced_vsync == true)
|
||||
{
|
||||
// echo '\nYour video driver is forcing vertical sync to be enabled. This will limit the system's frame-rate performance potential in any graphical tests!\n';
|
||||
}
|
||||
|
||||
// vblank_mode=0 has long been set within pts-core, but put it here too just since there's these other checks here
|
||||
putenv('vblank_mode=0');
|
||||
}
|
||||
public static function __post_test_run($test_result)
|
||||
{
|
||||
if($test_result->test_profile->get_test_hardware_type() != 'Graphics')
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Check for video resolution changes
|
||||
// Access the xrandr resolution directly to ensure it's not polling the FB size or one of the KMS modes
|
||||
$current_res = phodevi_gpu::gpu_xrandr_resolution();
|
||||
|
||||
if($current_res != self::$start_video_resolution && self::$start_video_resolution != array(-1, -1))
|
||||
{
|
||||
$video_width = $current_res[0];
|
||||
$video_height = $current_res[1];
|
||||
|
||||
$reset = self::$start_video_resolution;
|
||||
$reset_width = $reset[0];
|
||||
$reset_height = $reset[1];
|
||||
|
||||
// echo '\nThe video resolution had changed during testing and it was not properly reset! Now resetting to $reset_width x $reset_height from $video_width x $video_height.\n';
|
||||
phodevi::set_property('gpu', 'screen-resolution', array($reset_width, $reset_height));
|
||||
// Sleep for three seconds to allow time for display to settle after mode-set
|
||||
sleep(3);
|
||||
}
|
||||
|
||||
if(phodevi::is_nvidia_graphics())
|
||||
{
|
||||
$current_error_position = self::nvidia_gpu_error_count();
|
||||
|
||||
if($current_error_position > self::$error_pointer && $test_result instanceof pts_test_result)
|
||||
{
|
||||
// GPU Error(s) Happened During The Test
|
||||
$this_test = $test_result->test_profile->get_identifier();
|
||||
$this_error_count = $current_error_position - self::$error_pointer;
|
||||
|
||||
if(isset(self::$error_analysis[$this_test]))
|
||||
{
|
||||
$this_error_count += self::$error_analysis[$this_test];
|
||||
}
|
||||
|
||||
self::$error_analysis[$this_test] = $this_error_count; // Tally up errors for this test
|
||||
self::$error_count += $this_error_count; // Add to total error count
|
||||
self::$error_pointer = $current_error_position; // Reset the pointer
|
||||
}
|
||||
}
|
||||
}
|
||||
public static function __post_option_process()
|
||||
{
|
||||
if(self::$error_count > 0)
|
||||
{
|
||||
$error_breakdown = PHP_EOL;
|
||||
foreach(self::$error_analysis as $test => $error_count)
|
||||
{
|
||||
$error_breakdown .= PHP_EOL . $test . ': ' . $error_count;
|
||||
}
|
||||
|
||||
echo PHP_EOL . 'GPU Errors: ' . $error_count . $error_breakdown . PHP_EOL;
|
||||
}
|
||||
|
||||
if(self::$driver_forced_vsync && phodevi::is_nvidia_graphics())
|
||||
{
|
||||
shell_exec('nvidia-settings -a SyncToVBlank=1 2>&1');
|
||||
}
|
||||
}
|
||||
protected static function nvidia_gpu_error_count()
|
||||
{
|
||||
$count = phodevi_parser::read_nvidia_extension('GPUErrors');
|
||||
return $count == null || !is_numeric($count) ? 0 : $count;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
67
pts-core/modules/log_exporter.php
Normal file
67
pts-core/modules/log_exporter.php
Normal file
@@ -0,0 +1,67 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2016, Phoronix Media
|
||||
Copyright (C) 2016, 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 log_exporter extends pts_module_interface
|
||||
{
|
||||
const module_name = 'Log Exporter';
|
||||
const module_version = '1.0.0';
|
||||
const module_description = 'This module allows for easily exporting test run logs and system logs to external locations via specifying the directory paths via the COPY_TEST_RUN_LOGS_TO and COPY_SYSTEM_LOGS_TO environment variables.';
|
||||
const module_author = 'Michael Larabel';
|
||||
|
||||
public static function module_environmental_variables()
|
||||
{
|
||||
return array('COPY_TEST_RUN_LOGS_TO', 'COPY_SYSTEM_LOGS_TO');
|
||||
}
|
||||
public static function __test_log_output($log_file_path)
|
||||
{
|
||||
if(getenv('COPY_TEST_RUN_LOGS_TO') == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
$COPY_TEST_RUN_LOGS_TO = getenv('COPY_TEST_RUN_LOGS_TO');
|
||||
|
||||
pts_file_io::mkdir($COPY_TEST_RUN_LOGS_TO);
|
||||
if(is_writable($COPY_TEST_RUN_LOGS_TO))
|
||||
{
|
||||
copy($log_file_path, $COPY_TEST_RUN_LOGS_TO . '/' . basename($log_file_path));
|
||||
}
|
||||
}
|
||||
public static function __post_test_run_system_logs($log_file_path)
|
||||
{
|
||||
if(getenv('COPY_SYSTEM_LOGS_TO') == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
$COPY_SYSTEM_LOGS_TO = getenv('COPY_SYSTEM_LOGS_TO');
|
||||
|
||||
pts_file_io::mkdir($COPY_SYSTEM_LOGS_TO);
|
||||
if(is_writable($COPY_SYSTEM_LOGS_TO))
|
||||
{
|
||||
foreach(pts_file_io::glob($log_file_path . '/*') as $sys_log_file)
|
||||
{
|
||||
copy($sys_log_file, $COPY_SYSTEM_LOGS_TO . '/' . basename($sys_log_file));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
123
pts-core/modules/ob_auto_compare.php
Normal file
123
pts-core/modules/ob_auto_compare.php
Normal file
@@ -0,0 +1,123 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2017, 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 ob_auto_compare extends pts_module_interface
|
||||
{
|
||||
const module_name = 'OpenBenchmarking.org Auto Comparison';
|
||||
const module_version = '1.0.0';
|
||||
const module_description = 'This module prints comparable OpenBenchmarking.org results in the command-line for reference purposes as tests are being run. OpenBenchmarking.org is automatically queried for results to show based on the test comparison hash and the system type (mobile, desktop, server, cloud, workstation, etc). No other system information or result data is transmitted..';
|
||||
const module_author = 'Michael Larabel';
|
||||
|
||||
private static $response_time = 0;
|
||||
|
||||
public static function user_commands()
|
||||
{
|
||||
return array('debug' => 'debug_result_file');
|
||||
}
|
||||
public static function debug_result_file($r)
|
||||
{
|
||||
if(empty($r) || !pts_types::is_result_file($r[0]))
|
||||
{
|
||||
echo 'No result file supplied.';
|
||||
return;
|
||||
}
|
||||
$result_file = new pts_result_file($r[0]);
|
||||
foreach($result_file->get_result_objects() as $result_object)
|
||||
{
|
||||
echo trim($result_object->test_profile->get_title() . ' ' . $result_object->test_profile->get_app_version() . PHP_EOL . $result_object->get_arguments_description()) . PHP_EOL;
|
||||
echo 'COMPARISON HASH:' . $result_object->get_comparison_hash(true, false) . PHP_EOL;
|
||||
echo 'SYSTEM TYPE: ' . phodevi_base::determine_system_type(phodevi::system_hardware(), phodevi::system_software()) . PHP_EOL;
|
||||
$auto_comparison_result_file = self::request_compare_from_ob($result_object->get_comparison_hash(), phodevi_base::determine_system_type(phodevi::system_hardware(), phodevi::system_software()));
|
||||
|
||||
if($auto_comparison_result_file instanceof pts_result_file)
|
||||
{
|
||||
$merge_ch = $auto_comparison_result_file->add_result($result_object);
|
||||
$ro = $auto_comparison_result_file->get_result($merge_ch);
|
||||
$ro->sort_results_by_performance();
|
||||
$ro->test_result_buffer->buffer_values_reverse();
|
||||
echo pts_result_file_output::test_result_to_text($ro, 80, true, $result_file->get_system_identifiers());
|
||||
echo PHP_EOL . ' REFERENCE: ' . $auto_comparison_result_file->get_reference_id() . PHP_EOL;
|
||||
}
|
||||
else
|
||||
{
|
||||
echo 'NO MATCHES';
|
||||
}
|
||||
|
||||
echo PHP_EOL . PHP_EOL;
|
||||
}
|
||||
}
|
||||
protected static function request_compare_from_ob($comparison_hash, $system_type)
|
||||
{
|
||||
if(!pts_network::internet_support_available() || self::$response_time > 12)
|
||||
{
|
||||
// If no network or OB requests are being slow...
|
||||
return false;
|
||||
}
|
||||
|
||||
$ob_request_time = time();
|
||||
$json_response = pts_openbenchmarking::make_openbenchmarking_request('auto_compare_via_hash', array('comparison_hash' => $comparison_hash, 'system_type' => $system_type));
|
||||
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']))
|
||||
{
|
||||
$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']);
|
||||
return $result_file;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
public static function __pre_run_process($test_run_manager)
|
||||
{
|
||||
if(!$test_run_manager->is_interactive_mode())
|
||||
{
|
||||
return pts_module::MODULE_UNLOAD;
|
||||
}
|
||||
}
|
||||
public static function __test_run_success_inline_result($result_object)
|
||||
{
|
||||
// Passed is a copy of the successful pts_test_result after showing other inline metrics
|
||||
if($result_object->test_result_buffer->get_count() < 3)
|
||||
{
|
||||
$auto_comparison_result_file = self::request_compare_from_ob($result_object->get_comparison_hash(), phodevi_base::determine_system_type(phodevi::system_hardware(), phodevi::system_software()));
|
||||
|
||||
if($auto_comparison_result_file instanceof pts_result_file)
|
||||
{
|
||||
$merge_ch = $auto_comparison_result_file->add_result($result_object);
|
||||
$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 Reference:') . ' http://openbenchmarking.org/result/' . $auto_comparison_result_file->get_reference_id() . PHP_EOL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
@@ -3,8 +3,8 @@
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2015 - 2016, Phoronix Media
|
||||
Copyright (C) 2015 - 2016, Michael Larabel
|
||||
Copyright (C) 2015 - 2017, Phoronix Media
|
||||
Copyright (C) 2015 - 2017, Michael Larabel
|
||||
perf_per_dollar.php: This module is derived from the system_monitor module
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
@@ -24,18 +24,19 @@
|
||||
class perf_per_dollar extends pts_module_interface
|
||||
{
|
||||
const module_name = 'Performance Per Dollar/Cost Calculator';
|
||||
const module_version = '0.1.1';
|
||||
const module_description = 'Setting the COST_PERF_PER_DOLLAR= environment variable to whatever value of the system cost/component you are running a comparison on will yield extra graphs that calculate the performance-per-dollar based on the test being run. The COST_PERF_PER_DOLLAR environment variable is applied just to the current test run identifier.';
|
||||
const module_version = '0.2.0';
|
||||
const module_description = 'Setting the COST_PERF_PER_DOLLAR= environment variable to whatever value of the system cost/component you are running a comparison on will yield extra graphs that calculate the performance-per-dollar based on the test being run. The COST_PERF_PER_DOLLAR environment variable is applied just to the current test run identifier. Set the COST_PERF_PER_UNIT= environment variable if wishing to use a metric besides dollar/cost.';
|
||||
const module_author = 'Michael Larabel';
|
||||
|
||||
private static $COST_PERF_PER_DOLLAR = 0;
|
||||
private static $COST_PERF_PER_UNIT = 'Dollar';
|
||||
private static $successful_test_run_request = null;
|
||||
private static $perf_per_dollar_collection;
|
||||
private static $result_identifier;
|
||||
|
||||
public static function module_environmental_variables()
|
||||
{
|
||||
return array('COST_PERF_PER_DOLLAR');
|
||||
return array('COST_PERF_PER_DOLLAR', 'COST_PERF_PER_UNIT');
|
||||
}
|
||||
public static function module_info()
|
||||
{
|
||||
@@ -48,6 +49,11 @@ class perf_per_dollar extends pts_module_interface
|
||||
self::$COST_PERF_PER_DOLLAR = $d;
|
||||
echo PHP_EOL . 'The Phoronix Test Suite will generate performance-per-dollar graphs with an assumed value of $' . $d . '.' . PHP_EOL;
|
||||
self::$perf_per_dollar_collection = array();
|
||||
|
||||
if(($d = getenv('COST_PERF_PER_UNIT')) != false)
|
||||
{
|
||||
self::$COST_PERF_PER_UNIT = $d;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -73,6 +79,12 @@ class perf_per_dollar extends pts_module_interface
|
||||
if(self::$successful_test_run_request->test_profile->get_result_proportion() == 'HIB')
|
||||
{
|
||||
$result = pts_math::set_precision(self::$successful_test_run_request->active->get_result() / self::$COST_PERF_PER_DOLLAR);
|
||||
$scale = self::$successful_test_run_request->test_profile->get_result_scale() . ' Per ' . self::$COST_PERF_PER_UNIT;
|
||||
}
|
||||
else if(self::$successful_test_run_request->test_profile->get_result_proportion() == 'LIB')
|
||||
{
|
||||
$result = pts_math::set_precision(self::$successful_test_run_request->active->get_result() * self::$COST_PERF_PER_DOLLAR);
|
||||
$scale = self::$successful_test_run_request->test_profile->get_result_scale() . ' x ' . self::$COST_PERF_PER_UNIT;
|
||||
}
|
||||
|
||||
if($result != 0)
|
||||
@@ -82,7 +94,7 @@ class perf_per_dollar extends pts_module_interface
|
||||
$test_result->test_profile->set_identifier(null);
|
||||
$test_result->set_used_arguments_description('Performance / Cost - ' . $test_result->get_arguments_description());
|
||||
$test_result->set_used_arguments('dollar comparison ' . $test_result->get_arguments());
|
||||
$test_result->test_profile->set_result_scale($test_result->test_profile->get_result_scale() . ' Per Dollar');
|
||||
$test_result->test_profile->set_result_scale($scale);
|
||||
$test_result->test_result_buffer = new pts_test_result_buffer();
|
||||
$test_result->test_result_buffer->add_test_result(self::$result_identifier, $result, null, array('install-footnote' => '$' . self::$COST_PERF_PER_DOLLAR . ' reported cost.'));
|
||||
$result_file->add_result($test_result);
|
||||
@@ -109,7 +121,7 @@ class perf_per_dollar extends pts_module_interface
|
||||
$test_result->set_used_arguments_description('Performance Per Dollar');
|
||||
$test_result->set_used_arguments('Per-Per-Dollar');
|
||||
$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_perf_dollar), null, array('install-footnote' => '$' . self::$COST_PERF_PER_DOLLAR . ' reported cost. Average result: ' . pts_math::set_precision($avg) . '.'));
|
||||
$test_result->test_result_buffer->add_test_result(self::$result_identifier, pts_math::set_precision($avg_perf_dollar), null, array('install-footnote' => '$' . self::$COST_PERF_PER_DOLLAR . ' reported value. Average result: ' . pts_math::set_precision($avg) . '.'));
|
||||
$test_run_manager->result_file->add_result($test_result);
|
||||
}
|
||||
}
|
||||
|
||||
151
pts-core/modules/perf_tips.php
Normal file
151
pts-core/modules/perf_tips.php
Normal file
@@ -0,0 +1,151 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2017, Paolo Valente <paolo.valente@linaro.org>
|
||||
Copyright (C) 2017, 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_perf_tip_msg
|
||||
{
|
||||
public $message;
|
||||
public $action;
|
||||
public $reference_url;
|
||||
public function __construct($msg, $act = null, $url = null)
|
||||
{
|
||||
$this->message = $msg;
|
||||
$this->action = $act;
|
||||
$this->reference_url = $url;
|
||||
}
|
||||
public function get_message()
|
||||
{
|
||||
return $this->message;
|
||||
}
|
||||
public function get_action()
|
||||
{
|
||||
return $this->action;
|
||||
}
|
||||
public function get_reference_url()
|
||||
{
|
||||
return $this->reference_url;
|
||||
}
|
||||
}
|
||||
|
||||
class perf_tips extends pts_module_interface
|
||||
{
|
||||
const module_name = 'Performance Tip Prompts';
|
||||
const module_version = '0.1.0';
|
||||
const module_description = 'This module alerts the user if the system configuration may not be the right one for achieving the best performance with the target benchmark(s). This initial version of the module actually cares only about the BFQ I/O scheduler and powersave governor checks.';
|
||||
const module_author = 'Paolo Valente <paolo.valente@linaro.org>';
|
||||
|
||||
public static function module_info()
|
||||
{
|
||||
return 'This module alerts the user if the system configuration may not be the right one for achieving the best performance with the target benchmark(s). This initial version of the module actually cares only about the BFQ I/O scheduler: it gives a warning if BFQ is being used with an incorrect configuration in a disk benchmark, and suggests the right configuration to use. For the moment it only works for existing, throughput-based tests. It will need to be extended for responsiveness and soft real-time-latency tests.';
|
||||
}
|
||||
public static function module_environmental_variables()
|
||||
{
|
||||
return array('SUPPRESS_PERF_TIPS');
|
||||
}
|
||||
public static function __run_manager_setup()
|
||||
{
|
||||
// Verify SUPPRESS_PERF_TIPS is not set and is Linux
|
||||
if(getenv('SUPPRESS_PERF_TIPS') == 1)
|
||||
{
|
||||
return pts_module::MODULE_UNLOAD; // This module doesn't have anything else to do
|
||||
}
|
||||
}
|
||||
public static function user_commands()
|
||||
{
|
||||
return array('show' => 'show_perf_tips');
|
||||
}
|
||||
public static function __pre_run_process($test_run_manager)
|
||||
{
|
||||
$test_hardware_types = array();
|
||||
foreach($test_run_manager->get_tests_to_run() as $test_run_request)
|
||||
{
|
||||
pts_arrays::unique_push($test_hardware_types, $test_run_request->test_profile->get_test_hardware_type());
|
||||
}
|
||||
self::show_perf_tips($test_hardware_types, $test_run_manager->is_interactive_mode());
|
||||
}
|
||||
public static function show_perf_tips($test_hardware_types = false, $interactive_mode = false)
|
||||
{
|
||||
$perf_tips = array();
|
||||
$show_all = false;
|
||||
if($test_hardware_types == false || !is_array($test_hardware_types))
|
||||
{
|
||||
$show_all = true;
|
||||
$test_hardware_types = array();
|
||||
}
|
||||
|
||||
if($show_all || in_array('Disk', $test_hardware_types))
|
||||
{
|
||||
// BELOW ARE CHECKS TO MAKE IF WANTING TO SHOW FOR 'DISK' TESTS
|
||||
$disk_scheduler = phodevi::read_property('disk', 'scheduler');
|
||||
|
||||
if($disk_scheduler == 'BFQ' || $disk_scheduler == 'BFQ-MQ' || $disk_scheduler == 'BFQ-SQ')
|
||||
{
|
||||
$mount_options = phodevi::read_property('disk', 'mount-options');
|
||||
$partition = basename($mount_options['device']);
|
||||
$device = pts_strings::keep_in_string($partition, pts_strings::CHAR_LETTER);
|
||||
$low_latency_file = '/sys/block/' . $device . '/queue/iosched/low_latency';
|
||||
$low_latency = pts_file_io::file_get_contents($low_latency_file);
|
||||
|
||||
if($low_latency == 0)
|
||||
return;
|
||||
|
||||
$perf_tips[] = new pts_perf_tip_msg('The BFQ I/O scheduler was detected and is being used in low-latency mode. In low-latency mode, BFQ sacrifices throughput when needed to guarantee either maximum responsiveness or low latency to isochronous I/O (the I/O of, e.g., video and audio players).', 'echo 0 > ' . $low_latency_file);
|
||||
}
|
||||
}
|
||||
if($show_all || in_array('System', $test_hardware_types) || in_array('Processor', $test_hardware_types))
|
||||
{
|
||||
// BELOW ARE CHECKS TO MAKE IF WANTING TO SHOW FOR 'Processor' OR 'System' TESTS
|
||||
$cpu_scaling_governor = phodevi::read_property('cpu', 'scaling-governor');
|
||||
|
||||
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');
|
||||
}
|
||||
}
|
||||
|
||||
if(!empty($perf_tips))
|
||||
{
|
||||
foreach($perf_tips as &$tip)
|
||||
{
|
||||
pts_client::$display->display_interrupt_message($tip->get_message(), 'Performance Tip', 'green');
|
||||
if($tip->get_action() != null)
|
||||
{
|
||||
pts_client::$display->display_interrupt_message('To change behavior, run: ', null, 'gray');
|
||||
pts_client::$display->display_interrupt_message($tip->get_action(), null, 'gray');
|
||||
}
|
||||
if($tip->get_reference_url() != null)
|
||||
{
|
||||
pts_client::$display->display_interrupt_message('Reference: ' . $tip->get_reference_url(), null, 'red');
|
||||
}
|
||||
echo PHP_EOL;
|
||||
}
|
||||
|
||||
if($interactive_mode)
|
||||
{
|
||||
pts_client::$display->display_interrupt_message('To stop showing performance tips, run: phoronix-test-suite unload-module perf_tips', null, 'gray');
|
||||
pts_client::$display->display_interrupt_message('Continuing in 5 seconds or press CTRL-C to stop the testing process.', null, 'green');
|
||||
sleep(5);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
@@ -242,6 +242,7 @@ class phoromatic extends pts_module_interface
|
||||
}
|
||||
}
|
||||
|
||||
// Randomize the thread work a little bit to ensure not hitting the systems at the same time
|
||||
sleep(rand(60, 90));
|
||||
}
|
||||
}
|
||||
@@ -304,7 +305,7 @@ class phoromatic extends pts_module_interface
|
||||
if(self::$limit_network_communication)
|
||||
{
|
||||
static $last_comm_time = 0;
|
||||
if(time() > ($last_comm_time + 1740 + rand(0, 360)))
|
||||
if(time() > ($last_comm_time + 800 + rand(0, 180)))
|
||||
{
|
||||
// It's been at least half hour since last update, so report in state...
|
||||
$last_comm_time = time();
|
||||
@@ -556,7 +557,7 @@ class phoromatic extends pts_module_interface
|
||||
|
||||
if($just_started)
|
||||
{
|
||||
if(PTS_IS_DAEMONIZED_SERVER_PROCESS && !self::$limit_network_communication)
|
||||
if(PTS_IS_DAEMONIZED_SERVER_PROCESS && !self::$limit_network_communication && function_exists('pcntl_fork'))
|
||||
{
|
||||
$pid = pcntl_fork();
|
||||
if($pid == 0)
|
||||
|
||||
134
pts-core/modules/report_test_run_times.php
Normal file
134
pts-core/modules/report_test_run_times.php
Normal file
@@ -0,0 +1,134 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2017, Phoronix Media
|
||||
Copyright (C) 2017, 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 report_test_run_times extends pts_module_interface
|
||||
{
|
||||
const module_name = 'Report Test Time Graphs';
|
||||
const module_version = '1.1.0';
|
||||
const module_description = 'Setting the RUN_TIMES_ARE_A_BENCHMARK=1 environment variable will automatically create additional graphs for each test run plotting the run-time needed for each test being executed. Setting the INSTALL_TIMES_ARE_A_BENCHMARK=1 environment variable will automatically create additional graphs for each test run plotting the time required for the test installation. Setting the INSTALL_SIZES_ARE_A_BENCHMARK=1 environment variable will automatically create additional graphs for each test run plotting the size of the installed test directory.';
|
||||
const module_author = 'Michael Larabel';
|
||||
|
||||
private static $successful_test_run_request = null;
|
||||
private static $result_identifier;
|
||||
|
||||
public static function module_environmental_variables()
|
||||
{
|
||||
return array('RUN_TIMES_ARE_A_BENCHMARK', 'INSTALL_TIMES_ARE_A_BENCHMARK', 'INSTALL_SIZES_ARE_A_BENCHMARK');
|
||||
}
|
||||
public static function module_info()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
public static function __run_manager_setup(&$test_run_manager)
|
||||
{
|
||||
$is_being_used = false;
|
||||
|
||||
if(getenv('RUN_TIMES_ARE_A_BENCHMARK') != false)
|
||||
{
|
||||
echo PHP_EOL . 'The Phoronix Test Suite will generate graphs of test run-times.' . PHP_EOL;
|
||||
$is_being_used = true;
|
||||
}
|
||||
if(getenv('INSTALL_TIMES_ARE_A_BENCHMARK') != false)
|
||||
{
|
||||
echo PHP_EOL . 'The Phoronix Test Suite will generate graphs of test install times.' . PHP_EOL;
|
||||
$is_being_used = true;
|
||||
}
|
||||
if(getenv('INSTALL_SIZES_ARE_A_BENCHMARK') != false)
|
||||
{
|
||||
echo PHP_EOL . 'The Phoronix Test Suite will generate graphs of test installation directory sizes.' . PHP_EOL;
|
||||
$is_being_used = true;
|
||||
}
|
||||
|
||||
if(!$is_being_used)
|
||||
{
|
||||
return pts_module::MODULE_UNLOAD; // This module doesn't have anything else to do
|
||||
}
|
||||
|
||||
$test_run_manager->force_results_save();
|
||||
}
|
||||
public static function __pre_run_process(&$test_run_manager)
|
||||
{
|
||||
self::$result_identifier = $test_run_manager->get_results_identifier();
|
||||
}
|
||||
public static function __post_test_run($test_run_request)
|
||||
{
|
||||
self::$successful_test_run_request = clone $test_run_request;
|
||||
}
|
||||
public static function __post_test_run_process(&$result_file)
|
||||
{
|
||||
if(getenv('RUN_TIMES_ARE_A_BENCHMARK') && self::$successful_test_run_request && !empty(self::$successful_test_run_request->test_run_times))
|
||||
{
|
||||
$result = round(array_sum(self::$successful_test_run_request->test_run_times) / count(self::$successful_test_run_request->test_run_times), 2);
|
||||
if($result > 0)
|
||||
{
|
||||
// This copy isn't needed but it's shorter and from port from system_monitor where there can be multiple items tracked
|
||||
$test_result = clone self::$successful_test_run_request;
|
||||
$test_result->test_profile->set_identifier(null);
|
||||
$test_result->set_used_arguments_description('Test Run Time' . ($test_result->get_arguments_description() != null ? ' - ' . $test_result->get_arguments_description() : null ));
|
||||
$test_result->set_used_arguments('test run time ' . $test_result->get_arguments());
|
||||
$test_result->test_profile->set_result_scale('Seconds');
|
||||
$test_result->test_profile->set_result_proportion('LIB');
|
||||
$test_result->test_result_buffer = new pts_test_result_buffer();
|
||||
$test_result->test_result_buffer->add_test_result(self::$result_identifier, $result, implode(':', self::$successful_test_run_request->test_run_times));
|
||||
$result_file->add_result($test_result);
|
||||
}
|
||||
}
|
||||
if(getenv('INSTALL_TIMES_ARE_A_BENCHMARK') && self::$successful_test_run_request && isset(self::$successful_test_run_request->test_profile->test_installation) && self::$successful_test_run_request->test_profile->test_installation)
|
||||
{
|
||||
$install_time = round(self::$successful_test_run_request->test_profile->test_installation->get_latest_install_time(), 3);
|
||||
|
||||
if($install_time > 0)
|
||||
{
|
||||
// This copy isn't needed but it's shorter and from port from system_monitor where there can be multiple items tracked
|
||||
$test_result = clone self::$successful_test_run_request;
|
||||
$test_result->test_profile->set_identifier(null);
|
||||
$test_result->set_used_arguments_description('Test Install Time');
|
||||
$test_result->set_used_arguments('test install time ');
|
||||
$test_result->test_profile->set_result_scale('Seconds');
|
||||
$test_result->test_profile->set_result_proportion('LIB');
|
||||
$test_result->test_result_buffer = new pts_test_result_buffer();
|
||||
$test_result->test_result_buffer->add_test_result(self::$result_identifier, $install_time);
|
||||
$result_file->add_result($test_result);
|
||||
}
|
||||
}
|
||||
if(getenv('INSTALL_SIZES_ARE_A_BENCHMARK') && self::$successful_test_run_request && isset(self::$successful_test_run_request->test_profile->test_installation) && self::$successful_test_run_request->test_profile->test_installation)
|
||||
{
|
||||
$install_size = self::$successful_test_run_request->test_profile->test_installation->get_install_size();
|
||||
|
||||
if($install_size > 0)
|
||||
{
|
||||
// This copy isn't needed but it's shorter and from port from system_monitor where there can be multiple items tracked
|
||||
$test_result = clone self::$successful_test_run_request;
|
||||
$test_result->test_profile->set_identifier(null);
|
||||
$test_result->set_used_arguments_description('Test Install Size');
|
||||
$test_result->set_used_arguments('test install size ');
|
||||
$test_result->test_profile->set_result_scale('Bytes');
|
||||
$test_result->test_profile->set_result_proportion('LIB');
|
||||
$test_result->test_result_buffer = new pts_test_result_buffer();
|
||||
$test_result->test_result_buffer->add_test_result(self::$result_identifier, $install_size);
|
||||
$result_file->add_result($test_result);
|
||||
}
|
||||
}
|
||||
self::$successful_test_run_request = null;
|
||||
}
|
||||
}
|
||||
?>
|
||||
98
pts-core/modules/results_custom_export.php
Normal file
98
pts-core/modules/results_custom_export.php
Normal file
@@ -0,0 +1,98 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2016, Phoronix Media
|
||||
Copyright (C) 2016, 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 results_custom_export extends pts_module_interface
|
||||
{
|
||||
const module_name = 'Custom Result Export Methods';
|
||||
const module_version = '1.0.0';
|
||||
const module_description = 'A simple example module about interfacing with Phoronix Test Suite core for dumping result files in a custom format.';
|
||||
const module_author = 'Michael Larabel';
|
||||
|
||||
public static function module_info()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
public static function user_commands()
|
||||
{
|
||||
return array('nf' => 'nf_format');
|
||||
}
|
||||
public static function nf_format($r)
|
||||
{
|
||||
if(pts_types::is_result_file($r[0]))
|
||||
{
|
||||
$result_file = new pts_result_file($r[0]);
|
||||
$result_output = $result_file->get_title() . PHP_EOL;
|
||||
$system_identifiers = array();
|
||||
$system_hardware = array();
|
||||
$system_software = array();
|
||||
$test_times = array();
|
||||
foreach($result_file->get_systems() as $system)
|
||||
{
|
||||
$system_identifiers[] = $system->get_identifier();
|
||||
$system_hardware[] = $system->get_hardware();
|
||||
$system_software[] = $system->get_software();
|
||||
$test_times[$system->get_identifier()] = date('Y-m-d', strtotime($system->get_timestamp()));
|
||||
}
|
||||
|
||||
/*
|
||||
// Show the system identifiers?
|
||||
for($i = 0; $i < count($system_identifiers); $i++)
|
||||
{
|
||||
$result_output .= $system_identifiers[$i] . ': ' . PHP_EOL . PHP_EOL;
|
||||
$result_output .= "\t" . $system_hardware[$i] . PHP_EOL . PHP_EOL . "\t" . $system_software[$i] . PHP_EOL . PHP_EOL;
|
||||
}*/
|
||||
|
||||
$result_lines = array();
|
||||
|
||||
foreach($result_file->get_result_objects() as $result_object)
|
||||
{
|
||||
foreach($result_object->test_result_buffer->buffer_items as &$buffer)
|
||||
{
|
||||
// DUMP in DATE/HARDWARE_TYPE/TEST_TYPE/TEST/ARGUMENTS/IDENTIFIER format
|
||||
$l = array(
|
||||
$test_times[$buffer->get_result_identifier()],
|
||||
$result_object->test_profile->get_test_hardware_type(),
|
||||
$result_object->test_profile->get_test_software_type(),
|
||||
$result_object->test_profile->get_title() . ' ' . $result_object->test_profile->get_app_version(),
|
||||
$result_object->get_arguments_description(),
|
||||
$buffer->get_result_identifier()
|
||||
);
|
||||
$result_lines[implode('/', $l)] = $buffer->get_result_value();
|
||||
}
|
||||
}
|
||||
|
||||
ksort($result_lines);
|
||||
$longest_key = max(array_map('strlen', array_keys($result_lines))) + 1;
|
||||
foreach($result_lines as $key => $value)
|
||||
{
|
||||
$result_output .= sprintf('%-' . $longest_key . 'ls = %s', $key, $value) . PHP_EOL;
|
||||
}
|
||||
echo $result_output . PHP_EOL;
|
||||
}
|
||||
else
|
||||
{
|
||||
echo 'Not a recognized result file: ' . $r . PHP_EOL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -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 - 2017, Phoronix Media
|
||||
Copyright (C) 2008 - 2017, Michael Larabel
|
||||
system_monitor.php: System sensor monitoring module for PTS
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
@@ -110,11 +110,6 @@ class system_monitor extends pts_module_interface
|
||||
|
||||
public static function __pre_test_run($test_run_request)
|
||||
{
|
||||
if(self::$individual_monitoring == false)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
self::$individual_test_run_request = clone $test_run_request;
|
||||
|
||||
// Just to pad in some idling into the run process
|
||||
@@ -161,11 +156,6 @@ class system_monitor extends pts_module_interface
|
||||
}
|
||||
public static function __post_test_run_process(&$result_file)
|
||||
{
|
||||
if(self::$individual_monitoring == false)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// The self::$test_run_timer to contain how long each individual test run lasted, should anything else past this point want to use the info...
|
||||
self::$test_run_timer = time() - self::$test_run_timer;
|
||||
|
||||
@@ -177,9 +167,12 @@ class system_monitor extends pts_module_interface
|
||||
self::process_perf_per_watt($result_file);
|
||||
}
|
||||
|
||||
foreach(self::$to_monitor as $sensor)
|
||||
if(self::$individual_monitoring != false)
|
||||
{
|
||||
self::process_test_run_results($sensor, $result_file);
|
||||
foreach(self::$to_monitor as $sensor)
|
||||
{
|
||||
self::process_test_run_results($sensor, $result_file);
|
||||
}
|
||||
}
|
||||
|
||||
self::$test_run_tries_offsets = array();
|
||||
@@ -217,7 +210,10 @@ class system_monitor extends pts_module_interface
|
||||
continue;
|
||||
}
|
||||
|
||||
pcntl_waitpid($pid, $status);
|
||||
if(function_exists('pcntl_waitpid'))
|
||||
{
|
||||
pcntl_waitpid($pid, $status);
|
||||
}
|
||||
}
|
||||
|
||||
self::$monitor_pids = array();
|
||||
@@ -393,7 +389,6 @@ class system_monitor extends pts_module_interface
|
||||
}
|
||||
|
||||
self::$perf_per_watt_collection = array();
|
||||
self::$individual_monitoring = true;
|
||||
echo PHP_EOL . 'To Provide Performance-Per-Watt Outputs.' . PHP_EOL;
|
||||
}
|
||||
}
|
||||
@@ -619,6 +614,7 @@ class system_monitor extends pts_module_interface
|
||||
}
|
||||
else if($test_result->test_profile->get_result_proportion() == 'LIB')
|
||||
{
|
||||
return; // with below code not rendering nicely
|
||||
$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));
|
||||
@@ -672,7 +668,6 @@ class system_monitor extends pts_module_interface
|
||||
}
|
||||
|
||||
self::write_test_run_results($result_buffer, $result_file, $sensor);
|
||||
|
||||
self::$individual_test_run_offsets[phodevi::sensor_object_identifier($sensor)] = array();
|
||||
self::$test_run_tries_offsets[phodevi::sensor_object_identifier($sensor)] = array();
|
||||
}
|
||||
@@ -685,7 +680,7 @@ class system_monitor extends pts_module_interface
|
||||
|
||||
$test_result = clone self::$individual_test_run_request;
|
||||
|
||||
if (pts_module_manager::is_module_attached("matisk"))
|
||||
if(pts_module_manager::is_module_attached('matisk'))
|
||||
{
|
||||
// TODO find some better way than adding a number to distinguish the results between the MATISK runs
|
||||
$arguments_description = phodevi::sensor_object_name($sensor) . ' Monitor (test ' . count($result_file->get_systems()) . ')';
|
||||
|
||||
@@ -47,7 +47,7 @@ class toggle_screensaver extends pts_module_interface
|
||||
public static function __startup()
|
||||
{
|
||||
$halt_screensaver = pts_module::read_variable('HALT_SCREENSAVER');
|
||||
if((!empty($halt_screensaver) && !pts_strings::string_bool($halt_screensaver)) || phodevi::read_property('system', 'display-server') == null)
|
||||
if((!empty($halt_screensaver) && !pts_strings::string_bool($halt_screensaver)) || (phodevi::read_property('system', 'display-server') == null && getenv('XDG_CURRENT_DESKTOP') == false))
|
||||
{
|
||||
return pts_module::MODULE_UNLOAD;
|
||||
}
|
||||
@@ -77,7 +77,7 @@ class toggle_screensaver extends pts_module_interface
|
||||
|
||||
$sleep_display_ac = trim(shell_exec(self::$gnome_gconftool . ' -g /apps/gnome-power-manager/timeout/sleep_display_ac 2>&1'));
|
||||
|
||||
if($sleep_display_ac != 0)
|
||||
if(is_numeric($sleep_display_ac) && $sleep_display_ac != 0)
|
||||
{
|
||||
// Don't sleep the display when on AC power
|
||||
shell_exec(self::$gnome_gconftool . ' --type int --set /apps/gnome-power-manager/timeout/sleep_display_ac 0 2>&1');
|
||||
|
||||
@@ -86,8 +86,7 @@ var $PDFVersion; // PDF version number
|
||||
* Public methods *
|
||||
* *
|
||||
*******************************************************************************/
|
||||
function FPDF($orientation='P', $unit='mm', $size='A4')
|
||||
{
|
||||
public function __construct($orientation='P',$unit='mm',$size='A4') {
|
||||
// Some checks
|
||||
$this->_dochecks();
|
||||
// Initialization of properties
|
||||
|
||||
@@ -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 - 2017, Phoronix Media
|
||||
Copyright (C) 2009 - 2017, Michael Larabel
|
||||
pts_basic_display_mode.php: The basic display mode
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
@@ -165,6 +165,10 @@ class pts_basic_display_mode implements pts_display_mode_interface
|
||||
|
||||
echo self::string_header($end_print, '#');
|
||||
}
|
||||
public function test_run_success_inline($test_result)
|
||||
{
|
||||
// empty
|
||||
}
|
||||
public function test_run_error($error_string)
|
||||
{
|
||||
echo PHP_EOL . $error_string . PHP_EOL . PHP_EOL;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user