Skip to content

Commit

Permalink
Adapt to Quisby fio support (distributed-system-analysis#3522)
Browse files Browse the repository at this point in the history
PBENCH-1212

(This Jira issue was originally a placeholder in case changes had to be made
to the `comparison` or `visualize` APIs for `fio` support. It seemed likely
that wouldn't be necessary, and I'm appropriating the Jira to unlock the
`pquisby` package version and adjust tests.)

First, unlock the `pquisby` package version to allow consuming the 0.0.17
version with `fio` support added.

Both unit and functional tests validate the set of benchmarked workloads for
which Pbench claims support, and needed to be updated for the addition of
`fio`. The `endpoints` API was also reporting the workloads in order from
Pquisby's ENUM, and to make the tests a bit more supportable I sorted the
list we report.
  • Loading branch information
dbutenhof authored Aug 21, 2023
1 parent 5c16476 commit cc35a0c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion lib/pbench/server/api/resources/endpoint_configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,9 @@ def _get(self, args: ApiParams, request: Request, context: ApiContext) -> Respon
"identification": f"Pbench server {self.server_config.COMMIT_ID}",
"uri": templates,
"visualization": {
"benchmarks": [m.lower() for m in BenchmarkName.__members__.keys()]
"benchmarks": sorted(
m.lower() for m in BenchmarkName.__members__.keys()
)
},
}

Expand Down
2 changes: 1 addition & 1 deletion lib/pbench/test/functional/server/test_connect.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def test_connect(self, server_client: PbenchServerClient):
assert endpoints
assert "identification" in endpoints
assert "uri" in endpoints
assert endpoints["visualization"]["benchmarks"] == ["uperf"]
assert sorted(endpoints["visualization"]["benchmarks"]) == ["fio", "uperf"]

# Verify that all expected endpoints are reported
for a in endpoints["uri"].keys():
Expand Down
2 changes: 1 addition & 1 deletion lib/pbench/test/unit/server/test_endpoint_configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def check_config(self, client, server_config, host, my_headers={}):
uri = urljoin(host, uri_prefix)
expected_results = {
"identification": f"Pbench server {server_config.COMMIT_ID}",
"visualization": {"benchmarks": ["uperf"]},
"visualization": {"benchmarks": ["fio", "uperf"]},
"uri": {
"datasets": {
"template": f"{uri}/datasets/{{dataset}}",
Expand Down
2 changes: 1 addition & 1 deletion server/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ flask-restful>=0.3.9
flask-sqlalchemy
gunicorn
humanize
pquisby<0.0.13
pquisby
psycopg2
pyesbulk>=2.0.1
PyJwt[crypto]
Expand Down

0 comments on commit cc35a0c

Please sign in to comment.