mirror of
https://github.com/kasmtech/KasmVNC.git
synced 2025-06-27 13:11:30 +02:00
KASM-6984 Update benchmarking
This commit is contained in:
parent
9e79d8ae56
commit
fdc2f29ce2
@ -181,9 +181,21 @@ void benchmark(const std::string &path) {
|
||||
auto add_benchmark_item = [&doc, &test_suit, &total_tests](const char *name, auto value) {
|
||||
auto *test_case = doc.NewElement("testcase");
|
||||
test_case->SetAttribute("name", name);
|
||||
test_case->SetAttribute("filename", value);
|
||||
test_case->SetAttribute("file", value);
|
||||
test_case->SetAttribute("runs", 1);
|
||||
test_case->SetAttribute("classname", "KasmVNC");
|
||||
|
||||
auto *props = doc.NewElement("properties");
|
||||
|
||||
auto *prop = doc.NewElement("property");
|
||||
prop->SetAttribute("name", name);
|
||||
props->InsertEndChild(prop);
|
||||
|
||||
prop = doc.NewElement("property");
|
||||
prop->SetAttribute("value", value);
|
||||
props->InsertEndChild(prop);
|
||||
|
||||
test_case->InsertEndChild(props);
|
||||
test_suit->InsertEndChild(test_case);
|
||||
|
||||
++total_tests;
|
||||
|
@ -1,6 +1,6 @@
|
||||
from mamba import description, context, it, fit, before, after
|
||||
from expects import expect, equal, contain, match
|
||||
from helper.spec_helper import run_cmd, clean_env, kill_xvnc, clean_locks
|
||||
from helper.spec_helper import run_cmd, clean_env, kill_xvnc
|
||||
|
||||
with description("Benchmarking"):
|
||||
with before.each:
|
||||
@ -10,4 +10,6 @@ with description("Benchmarking"):
|
||||
with it("runs benchmarks"):
|
||||
run_cmd("wget --no-check-certificate https://kasmweb-build-artifacts.s3.us-east-1.amazonaws.com/kasmvnc/static/127072-737747495_small.mp4 -O /tmp/video.mp4")
|
||||
completed_process = run_cmd("Xvnc -interface 0.0.0.0 :1 -Benchmark /tmp/video.mp4")
|
||||
command = '''sed -i "s/KasmVNC/$(grep -E '^ID=' /etc/os-release | cut -d= -f2 | tr -d '"') $(grep -E '^VERSION_CODENAME=' /etc/os-release | cut -d= -f2 | tr -d '"')/g" Benchmark.xml'''
|
||||
run_cmd(command)
|
||||
expect(completed_process.returncode).to(equal(0))
|
||||
|
Loading…
x
Reference in New Issue
Block a user