Skip to content

Commit

Permalink
Merge pull request #27 from SpareCores/DEV-331
Browse files Browse the repository at this point in the history
integrate new benchmarks for static HTTP server: binserve+wrk
  • Loading branch information
daroczig committed Aug 22, 2024
2 parents 2b4e0a6 + 014357c commit f4acb57
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## v0.3.x (development version)

...
- New benchmark: static HTTP server.

## v0.3.0 (Aug 20, 2024)

Expand Down
29 changes: 29 additions & 0 deletions src/sc_crawler/inspector.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,35 @@ def inspect_server_benchmarks(server: "Server") -> List[dict]:
except Exception as e:
_log_cannot_load_benchmarks(server, framework, e, True)

measurement = "static_web"
try:
with open(
_server_framework_path(server, measurement, "parsed.json"), "r"
) as fp:
workloads = json.load(fp)
versions = _server_framework_meta(server, measurement)["version"]
for size in workloads.keys():
for workload in workloads.get(size):
benchmarks.append(
{
**_benchmark_metafields(
server,
framework=measurement,
benchmark_id=":".join(["app", measurement]),
),
"config": {
"size": size,
"threads": workload["threads"],
"threads_per_cpu": int(workload["threads"] / server.vcpus),
"connections": workload["connections"],
"framework_version": versions,
},
"score": workload["rps"],
}
)
except Exception as e:
_log_cannot_load_benchmarks(server, framework, e, True)

return benchmarks


Expand Down
13 changes: 13 additions & 0 deletions src/sc_crawler/lookup.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,4 +276,17 @@ def _geekbenchmark(name: str, description: str):
},
unit="bogo ops/s (real time)",
),
Benchmark(
benchmark_id="app:static_web",
name="Static web server",
description="Serving smaller (1-65 kb) and larger (256-512 kb) files using a static HTTP server (binserve), and benchmarking each workload (wrk) using variable number of threads and connections on the same server.",
framework="app",
measurement="static_web",
config_fields={
"threads": "Total number of threads used by wrk.",
"connections": "Total number of HTTP connections kept open by wrk.",
"framework_version": "Version number of both binserve and wrk.",
},
unit="rps",
),
]

0 comments on commit f4acb57

Please sign in to comment.