Skip to content

Commit b73aa54

Browse files
authored
Merge pull request #5 from DIAGNijmegen/fix-benchmark
Fix benchmarking
2 parents f34103c + eb80632 commit b73aa54

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

cirrus_benchmark_suite/benchmark.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,9 @@ def benchmark_algorithm_job(benchmarks, page, session_url):
101101
with Timer() as timer:
102102
page.goto(algorihm_job_url)
103103

104-
# 1. View results
104+
# 1. Annotations statistics
105105
expect(
106-
page.locator('[data-plugin-name="AlgorithmResultPlugin"]')
106+
page.locator('[data-plugin-name="AnnotationStatisticsPlugin"]')
107107
).to_be_visible(timeout=20_000)
108108

109109
# 2. View annotations
@@ -132,7 +132,12 @@ def benchmark_archive_item(benchmarks, page, session_url):
132132
page.locator('[data-plugin-name="AnnotationListPlugin"]')
133133
).to_be_visible(timeout=20_000)
134134

135-
# 2. View images
135+
# 2. Overlay plugin
136+
expect(
137+
page.locator('[data-plugin-name="OverlayPlugin"]')
138+
).to_be_visible(timeout=20_000)
139+
140+
# 3. View images
136141
expect(page.locator('[data-test="viewitem"]')).to_have_count(4)
137142

138143
benchmarks["archiveitem.loading"] = _correct(timer.elapsed_time)
@@ -192,7 +197,7 @@ def report(history, evaluation):
192197

193198
def test():
194199
with sync_playwright() as playwright:
195-
browser = playwright.chromium.launch(headless=not DEBUG)
200+
browser = playwright.webkit.launch(headless=not DEBUG)
196201
try:
197202
ctx = browser.new_context()
198203

cirrus_benchmark_suite/session.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
import os
22

3+
from playwright.sync_api import Page
4+
35
from cirrus_benchmark_suite.utils import DEBUG, getenv
46

57

6-
def _manual_user_login(page):
8+
def _manual_user_login(page: Page):
79
print("Performing manual login")
810
page.get_by_text("Successfully signed in as").wait_for(
911
timeout=120_000, # 2 minutes
1012
)
1113

1214

13-
def _automatic_user_login(page, username, password):
15+
def _automatic_user_login(page: Page, username: str, password: str):
1416
page.get_by_placeholder("Username or email").fill(username)
1517
page.get_by_placeholder("Password").fill(password)
1618
page.get_by_role("button", name="Sign In").click()

0 commit comments

Comments
 (0)