Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
8795181
data frame parameter test
l0uden Apr 1, 2025
69f17b2
Revert "data frame parameter test"
l0uden Apr 2, 2025
3134da0
Merge branch 'main' of https://github.com/mckinsey/vizro
l0uden Apr 7, 2025
b71e210
Merge branch 'main' of https://github.com/mckinsey/vizro
l0uden Apr 8, 2025
7f01cae
Merge branch 'main' of https://github.com/mckinsey/vizro
l0uden Apr 9, 2025
e3c7f93
Merge branch 'main' of https://github.com/mckinsey/vizro
l0uden Apr 9, 2025
008cb72
Merge branch 'main' of https://github.com/mckinsey/vizro
l0uden Apr 9, 2025
6305456
Merge branch 'main' of https://github.com/mckinsey/vizro
l0uden Apr 10, 2025
ace4b5b
Merge branch 'main' of https://github.com/mckinsey/vizro
l0uden Apr 10, 2025
b11ed48
Merge branch 'main' of https://github.com/mckinsey/vizro
l0uden Apr 10, 2025
ae42e28
Merge branch 'main' of https://github.com/mckinsey/vizro
l0uden Apr 14, 2025
b8711b5
Merge branch 'main' of https://github.com/mckinsey/vizro
l0uden Apr 15, 2025
38cebdc
Merge branch 'main' of https://github.com/mckinsey/vizro
l0uden Apr 16, 2025
4d3464f
Merge branch 'main' of https://github.com/mckinsey/vizro
l0uden Apr 18, 2025
0cb855a
Merge branch 'main' of https://github.com/mckinsey/vizro
l0uden Apr 25, 2025
55591e6
Merge branch 'main' of https://github.com/mckinsey/vizro
l0uden May 12, 2025
2bb768e
Merge branch 'main' of https://github.com/mckinsey/vizro
l0uden May 13, 2025
1389c95
Merge branch 'main' of https://github.com/mckinsey/vizro
l0uden May 14, 2025
b10cc9c
Merge branch 'main' of https://github.com/mckinsey/vizro
l0uden May 14, 2025
32287e9
Merge branch 'main' of https://github.com/mckinsey/vizro
l0uden May 15, 2025
242b101
Merge branch 'main' of https://github.com/mckinsey/vizro
l0uden Jun 2, 2025
5ca5573
test extra parameter for graph
l0uden Jun 2, 2025
18682c4
Merge branch 'main' of https://github.com/mckinsey/vizro
l0uden Jun 3, 2025
bd2b546
Merge branch 'main' of https://github.com/mckinsey/vizro
l0uden Jun 9, 2025
31b8775
Merge branch 'main' of https://github.com/mckinsey/vizro
l0uden Jun 11, 2025
0f46334
Merge branch 'main' of https://github.com/mckinsey/vizro
l0uden Jun 11, 2025
a5f9730
Merge branch 'main' of https://github.com/mckinsey/vizro
l0uden Jun 13, 2025
b8e3790
Merge branch 'main' of https://github.com/mckinsey/vizro
l0uden Jun 25, 2025
6722cd4
Merge branch 'main' of https://github.com/mckinsey/vizro
l0uden Jun 27, 2025
3ab01a6
Merge branch 'main' of https://github.com/mckinsey/vizro
l0uden Jul 2, 2025
5ac3db6
Merge branch 'main' of https://github.com/mckinsey/vizro
l0uden Jul 3, 2025
55a2a8e
Merge branch 'main' of https://github.com/mckinsey/vizro
l0uden Jul 3, 2025
7fcc6cd
Merge branch 'main' of https://github.com/mckinsey/vizro
l0uden Jul 9, 2025
56ae702
Merge branch 'main' of https://github.com/mckinsey/vizro
l0uden Jul 9, 2025
8919bd5
Merge branch 'main' of https://github.com/mckinsey/vizro
l0uden Jul 10, 2025
3456ee0
Merge branch 'main' of https://github.com/mckinsey/vizro
l0uden Jul 14, 2025
de2de79
Merge branch 'main' of https://github.com/mckinsey/vizro
l0uden Jul 15, 2025
7cbb864
Merge branch 'main' of https://github.com/mckinsey/vizro
l0uden Jul 16, 2025
db4be72
Merge branch 'main' of https://github.com/mckinsey/vizro
l0uden Jul 22, 2025
f35e7eb
Merge branch 'main' of https://github.com/mckinsey/vizro
l0uden Jul 23, 2025
a5e4eae
Merge branch 'main' of https://github.com/mckinsey/vizro
l0uden Jul 28, 2025
b03889f
Merge branch 'main' of https://github.com/mckinsey/vizro
l0uden Jul 28, 2025
cb60a21
Merge branch 'main' of https://github.com/mckinsey/vizro
l0uden Jul 29, 2025
b0d68b3
Merge branch 'main' of https://github.com/mckinsey/vizro
l0uden Aug 6, 2025
8c223f9
Merge branch 'main' of https://github.com/mckinsey/vizro
l0uden Aug 6, 2025
53eebac
Merge branch 'main' of https://github.com/mckinsey/vizro
l0uden Aug 11, 2025
96f7de8
Merge branch 'main' of https://github.com/mckinsey/vizro
l0uden Aug 12, 2025
fcfb46a
Merge branch 'main' of https://github.com/mckinsey/vizro
l0uden Aug 26, 2025
f56a9bf
Merge branch 'main' of https://github.com/mckinsey/vizro
l0uden Aug 27, 2025
895b1a2
Merge branch 'main' of https://github.com/mckinsey/vizro
l0uden Aug 28, 2025
662c6e7
Merge branch 'main' of https://github.com/mckinsey/vizro
l0uden Sep 2, 2025
94d857c
Merge branch 'main' of https://github.com/mckinsey/vizro
l0uden Sep 10, 2025
e8b1940
Merge branch 'main' of https://github.com/mckinsey/vizro
l0uden Sep 10, 2025
5732e21
Merge branch 'main' of https://github.com/mckinsey/vizro
l0uden Sep 15, 2025
26e153b
Merge branch 'main' of https://github.com/mckinsey/vizro
l0uden Sep 17, 2025
865ca7a
Merge branch 'main' of https://github.com/mckinsey/vizro
l0uden Sep 19, 2025
55b25ba
Merge branch 'main' of https://github.com/mckinsey/vizro
l0uden Sep 19, 2025
4b1d1a4
Merge branch 'main' of https://github.com/mckinsey/vizro
l0uden Sep 22, 2025
8f97a56
Merge branch 'main' of https://github.com/mckinsey/vizro
l0uden Sep 24, 2025
cae16f2
Merge branch 'main' of https://github.com/mckinsey/vizro
l0uden Oct 1, 2025
c0a0b7e
Merge branch 'main' of https://github.com/mckinsey/vizro
l0uden Oct 13, 2025
8293ad8
Merge branch 'main' of https://github.com/mckinsey/vizro
l0uden Oct 14, 2025
fdb7e3e
Merge branch 'main' of https://github.com/mckinsey/vizro
l0uden Oct 16, 2025
d60f1a3
Merge branch 'main' of https://github.com/mckinsey/vizro
l0uden Oct 21, 2025
26ffe04
Merge branch 'main' of https://github.com/mckinsey/vizro
l0uden Oct 22, 2025
ba474f9
Merge branch 'main' of https://github.com/mckinsey/vizro
l0uden Oct 27, 2025
fe9ba38
Merge branch 'main' of https://github.com/mckinsey/vizro
l0uden Oct 28, 2025
36e96fb
Merge branch 'main' of https://github.com/mckinsey/vizro
l0uden Nov 4, 2025
873ecce
Merge branch 'main' of https://github.com/mckinsey/vizro
l0uden Nov 6, 2025
e1aa2b5
Merge branch 'main' of https://github.com/mckinsey/vizro
l0uden Nov 12, 2025
dadd7ed
Merge branch 'main' of https://github.com/mckinsey/vizro
l0uden Nov 17, 2025
698c220
Merge branch 'main' of https://github.com/mckinsey/vizro
l0uden Nov 19, 2025
b3aef82
Merge branch 'main' of https://github.com/mckinsey/vizro
l0uden Nov 28, 2025
374596c
simple response time test with playwright
l0uden Nov 28, 2025
954f1a3
linting
l0uden Nov 28, 2025
e5e934f
separate files for performance tests
l0uden Jan 9, 2026
bfc709f
Merge branch 'main' of https://github.com/mckinsey/vizro into qa/resp…
l0uden Jan 9, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .github/workflows/test-e2e-vizro-performance.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: e2e vizro performance tests

defaults:
run:
working-directory: vizro-core

permissions:
contents: read

on:
push:
branches:
- main
pull_request:
branches:

env:
PYTHONUNBUFFERED: 1
FORCE_COLOR: 1
PYTHON_VERSION: "3.13"

jobs:
test-e2e-vizro-performance-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install Hatch
run: pip install hatch
- name: Install Playwright and browser
run: |
hatch run pip install playwright
hatch run playwright install --with-deps chromium
- name: Run tests
run: |
hatch run test-e2e-vizro-performance

- name: Create artifacts
uses: actions/upload-artifact@v5
if: failure()
with:
name: performance-artifacts
path: |
/home/runner/work/vizro/vizro/vizro-core/*.png
5 changes: 5 additions & 0 deletions vizro-core/hatch.toml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,11 @@ test-e2e-vizro-http-requests = [
"tests/tests_utils/e2e/vizro/dashboards/wait-for-it.sh 127.0.0.1:5002 -t 30",
"pytest -vs --reruns 1 tests/e2e/vizro/test_http_requests --headless {args}"
]
test-e2e-vizro-performance = [
"gunicorn dashboard_performance:app -b 0.0.0.0:5002 -w 1 --timeout 90 &",
"tests/tests_utils/e2e/vizro/dashboards/wait-for-it.sh 127.0.0.1:5002 -t 30",
"pytest -vs --reruns 1 tests/e2e/vizro/test_performance --headless {args}"
]
test-e2e-vizro-screenshots = [
"gunicorn dashboard:app -b 0.0.0.0:5002 -w 1 --timeout 90 &",
"gunicorn dashboard_one_page:app -b 0.0.0.0:5003 -w 1 --timeout 90 &",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,4 +178,4 @@
app = Vizro(assets_folder="../assets").build(dashboard)

if __name__ == "__main__":
app.run(debug=True)
app.run()
Original file line number Diff line number Diff line change
Expand Up @@ -304,4 +304,4 @@ def my_custom_action(t: int):
app = Vizro().build(dashboard)

if __name__ == "__main__":
app.run(debug=True)
app.run()
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@
)

if __name__ == "__main__":
app.run(debug=True)
app.run()
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@
app = Vizro(assets_folder="../assets").build(dashboard)

if __name__ == "__main__":
app.run(debug=True)
app.run()
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@
)

if __name__ == "__main__":
app.run(debug=True)
app.run()
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
app = Vizro(assets_folder="../assets").build(dashboard)

if __name__ == "__main__":
app.run(debug=True)
app.run()
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import pandas as pd

import vizro.models as vm
import vizro.plotly.express as px
from vizro import Vizro

df_list = [px.data.iris()]
for i in range(1, 33333):
df_list.append(px.data.iris()) # noqa PERF401
iris = pd.concat(df_list)


page_with_chart_filter_parameter = vm.Page(
title="Page with chart, filter and parameter",
components=[
vm.Graph(
id="histogram_chart",
figure=px.histogram(
iris,
x="sepal_length",
y="petal_width",
color="sepal_width",
),
),
],
controls=[
vm.Filter(column="species", selector=vm.Dropdown()),
vm.Parameter(
targets=["histogram_chart.y"],
selector=vm.RadioItems(options=["petal_width", "petal_length"], value="petal_width"),
),
],
)


dashboard = vm.Dashboard(pages=[page_with_chart_filter_parameter])

app = Vizro().build(dashboard)
app.dash.enable_dev_tools(debug=True, dev_tools_ui=True, dev_tools_hot_reload=False)

if __name__ == "__main__":
app.run()
80 changes: 80 additions & 0 deletions vizro-core/tests/e2e/vizro/test_performance/test_performance.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
import re

from hamcrest import assert_that
from playwright.sync_api import sync_playwright
from werkzeug.http import parse_options_header


def performance(func):
"""Decorator for setting up playwright logic."""

def wrapper(request):
"""Simple test to measure request timings."""
with sync_playwright() as p:
# selecting the Chromium browser engine which starts a new browser instance
browser = p.chromium.launch()
# creating browser context - clean, isolated browser profile
context = browser.new_context(viewport={"width": 1920, "height": 1080})
# creating a new page inside the context
page = context.new_page()
response_times = []

def on_request(request):
if any(r in request.url for r in ["_dash-update-component"]):
timing = request.timing
request_type = re.findall(r"__(.*?)_[0-9a-f-]{8,}", request.post_data_json["output"])
request_time = timing["responseEnd"] - timing["requestStart"]
server_timing = parse_options_header(request.response().all_headers().get("server-timing", ""))[
1
].get("dur", 0)
if request_type:
response_times.append(
{
"request_type": request_type[0],
"request_time": request_time,
"server_timing": int(server_timing),
}
)

page.on("requestfinished", on_request)

page.goto("http://127.0.0.1:5002/")

func(page, response_times)

browser.close()

return wrapper


@performance
def test_time(page, response_times):
"""Simple test to measure request timings."""
page.locator(".dash-dropdown .Select-value-icon:nth-of-type(1)").nth(0).click()
page.get_by_text("petal_length").click()
page.wait_for_load_state("networkidle")
print(response_times) # noqa
assert_that(
response_times[0]["request_time"] < 1500,
reason=f"request time for {response_times[0]['request_type']} is higher than 1500ms",
)
assert_that(
response_times[1]["request_time"] < 5000,
reason=f"request time for {response_times[1]['request_type']} is higher than 5000ms",
)
assert_that(
response_times[2]["request_time"] < 5000,
reason=f"request time for {response_times[2]['request_type']} is higher than 5000ms",
)
assert_that(
response_times[0]["server_timing"] < 1300,
reason=f"server timing for {response_times[0]['request_type']} is higher than 1300ms",
)
assert_that(
response_times[1]["server_timing"] < 1300,
reason=f"server timing for {response_times[1]['request_type']} is higher than 1300ms",
)
assert_that(
response_times[2]["server_timing"] < 1300,
reason=f"request time for {response_times[2]['request_type']} is higher than 13000ms",
)
Loading