pkgs+=(
python3-scipy
python3-sphinx
+ python3-statsmodels
)
echo "Updating APT..."
echo "Installing packages..."
HOMEBREW_NO_AUTO_UPDATE=1 brew install cunit libnfs sphinx-doc
brew link sphinx-doc --force
- pip3 install scipy six
+ pip3 install scipy six statsmodels
}
main() {
;;
esac
-python.exe -m pip install scipy six
+python.exe -m pip install scipy six statsmodels
echo "Python3 path: $(type -p python3 2>&1)"
echo "Python3 version: $(python3 -V 2>&1)"
import subprocess
import multiprocessing
from pathlib import Path
+from statsmodels.sandbox.stats.runs import runstest_1samp
class FioTest():
log_lines = file_data.split('\n')
- seq_count = 0
- offsets = set()
+ offsets = []
prev = int(log_lines[0].split(',')[4])
for line in log_lines[1:]:
- offsets.add(prev/4096)
+ offsets.append(prev/4096)
if len(line.strip()) == 0:
continue
cur = int(line.split(',')[4])
- if cur - prev == 4096:
- seq_count += 1
prev = cur
- # 10 is an arbitrary threshold
- if seq_count > 10:
- self.passed = False
- self.failure_reason = "too many ({0}) consecutive offsets".format(seq_count)
-
if len(offsets) != 256:
self.passed = False
self.failure_reason += " number of offsets is {0} instead of 256".format(len(offsets))
self.passed = False
self.failure_reason += " missing offset {0}".format(i*4096)
+ (z, p) = runstest_1samp(list(offsets))
+ if p < 0.05:
+ self.passed = False
+ self.failure_reason += f" runs test failed with p = {p}"
+
class FioJobTest_t0022(FioJobTest):
"""Test consists of fio test job t0022"""