diff --git a/.github/workflows/profiler.yml b/.github/workflows/profiler.yml index f2e275e1bc..aa5de3ecfd 100644 --- a/.github/workflows/profiler.yml +++ b/.github/workflows/profiler.yml @@ -1,14 +1,14 @@ name: TileDB-SOMA Profiler run on: - push: - branches: pull_request: + + push: branches: - - "main" + - main + - 'release-*' + workflow_dispatch: -paths: - - ".github/workflows/profiler" jobs: check-links: diff --git a/profiler/ann_data.py b/profiler/ann_data.py index ca28e26d0b..0fea471665 100644 --- a/profiler/ann_data.py +++ b/profiler/ann_data.py @@ -4,13 +4,12 @@ import tiledbsoma as soma -census_S3_latest = dict(census_version="latest") -census_local_copy = dict(uri="/Users/brobatmili/projects/census_data/") +census_S3_latest = dict(census_version="2023-10-23") def main(): t1 = perf_counter() - with cellxgene_census.open_soma(**census_local_copy) as census: + with cellxgene_census.open_soma(**census_S3_latest) as census: with census["census_data"]["homo_sapiens"].axis_query( measurement_name="RNA", obs_query=soma.AxisQuery(value_filter="""tissue_general == 'eye'"""), diff --git a/profiler/perf_checker.sh b/profiler/perf_checker.sh index 451433645f..8140301743 100755 --- a/profiler/perf_checker.sh +++ b/profiler/perf_checker.sh @@ -10,4 +10,4 @@ pip install tiledbsoma pip install cellxgene_census python -m profiler "python ann_data.py" -t gtime -python ./top_profiler.py \ No newline at end of file +python ./profile_report.py \ No newline at end of file diff --git a/profiler/top_profiler.py b/profiler/profile_report.py similarity index 68% rename from profiler/top_profiler.py rename to profiler/profile_report.py index e867b7c00d..a737eca613 100644 --- a/profiler/top_profiler.py +++ b/profiler/profile_report.py @@ -10,16 +10,19 @@ last_two = dt[-2:] c = 0 -for s in dt: +for s in last_two: new_db = sorted(dt, key=lambda ProfileData: ProfileData.timestamp) - L = [1, 2] - L[0] = dt[0].user_time_sec - L[1] = dt[1].user_time_sec + L = [] + L[0] = dt[0].user_time_sec + dt[0].elapsed_time + L[1] = dt[1].user_time_sec + dt[1].elapsed_time for i in range(0, len(dt)): print(f"{i} dt[{i}].user_time_sec = {dt[i].user_time_sec} ts {dt[i].timestamp}") - print(f"L0 = {L[0]} L1 {L[1]}") + print(f"Prev = {L[0]} Curr = {L[1]}") if threshold * float(L[1]) < float(L[0]) or float(L[1]) > threshold * float(L[0]): raise SystemExit(f"Potential performance degradation detected {L[0]} va {L[1]}") print("No recent performance degradation detected") + print( + f"Prev TBD version = {dt[0].tiledbsoma_version} Curr TBD version = {dt[1].tiledbsoma_version}" + ) diff --git a/profiler/setup.py b/profiler/setup.py index e3d6722cd8..7921b399ce 100644 --- a/profiler/setup.py +++ b/profiler/setup.py @@ -4,5 +4,5 @@ name="soma-profiler", version="1.0", packages=find_packages(), - requires=["gitpython", "comacore", "psutil", "tiledbsoma", "cellxgene_census"], + requires=["gitpython", "psutil", "tiledbsoma", "cellxgene_census"], )