Skip to content

Commit 07d7b88

Browse files
performance testing
1 parent d662348 commit 07d7b88

File tree

2 files changed

+16
-17
lines changed

2 files changed

+16
-17
lines changed

.streamlit/pages.toml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
[[pages]]
2-
path = "app_pages/test.py"
3-
name = "Test Performance Page"
4-
icon = ":small_orange_diamond:"
51

62
[[pages]]
73
name = "Internal Dashboard"
@@ -13,6 +9,11 @@ path = "app_pages/Unity_vs_CR.py"
139
name = "Unity vs Curious Reader Funnel"
1410
icon = ":small_orange_diamond:"
1511

12+
[[pages]]
13+
path = "app_pages/test.py"
14+
name = "Test Performance Page"
15+
icon = ":small_orange_diamond:"
16+
1617
[[pages]]
1718
path = "app_pages/CR_Funnel.py"
1819
name = "Curious Reader Funnel"

app_pages/Unity_vs_CR.py

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,20 @@
1+
import time
2+
start = time.time()
13
import streamlit as st
2-
import settings
3-
from rich import print as rprint
4-
from millify import prettify
5-
import ui_components as uic
4+
from settings import initialize
5+
from ui_components import create_funnels
66
import ui_widgets as ui
77
import users
8-
import metrics
9-
from settings import get_logger
8+
from metrics import get_user_cohort_list
109

11-
settings.initialize()
10+
st.write("Imports done", time.time() - start)
11+
initialize()
1212

1313
ui.display_definitions_table("Data Notes",ui.data_notes)
1414
countries_list = users.get_country_list()
1515

1616
ui.colorize_multiselect_options()
1717

18-
logger = settings.get_logger()
19-
2018
# --- Filter Row ---
2119
col_date, col_lang, col_country = st.columns((1, 1, 1), gap="large")
2220

@@ -56,13 +54,13 @@
5654
if len(daterange) == 2 and countries_list:
5755

5856
# --- Get user cohorts ---
59-
user_cohort_list_unity = metrics.get_user_cohort_list(
57+
user_cohort_list_unity = get_user_cohort_list(
6058
daterange=daterange,
6159
languages=language,
6260
countries_list=countries_list,
6361
app="Unity"
6462
)
65-
user_cohort_list_cr = metrics.get_user_cohort_list(
63+
user_cohort_list_cr = get_user_cohort_list(
6664
daterange=daterange,
6765
languages=language,
6866
countries_list=countries_list,
@@ -73,7 +71,7 @@
7371

7472
# --- Funnel Charts ---
7573
with col1:
76-
uic.create_funnels(
74+
create_funnels(
7775
countries_list=countries_list,
7876
daterange=daterange,
7977
app="Unity",
@@ -83,7 +81,7 @@
8381
)
8482

8583
with col2:
86-
uic.create_funnels(
84+
create_funnels(
8785
countries_list=countries_list,
8886
daterange=daterange,
8987
app="CR",

0 commit comments

Comments
 (0)