sc_crawler.workload_profile_scores
Workload profile score computation and database persistence.
This module computes precomputed compound benchmark scores for all servers across all vendors and stores them as synthetic BenchmarkScore rows.
Functions:
- recompute_workload_profiles – Recompute workload-profile scores for all servers and persist them.
func recompute_workload_profiles
recompute_workload_profiles(session)
Recompute workload-profile scores for all servers and persist them.
Marks all existing workload-profile BenchmarkScore rows inactive, then loads all active raw benchmark scores from the database (excluding workload-profile rows to avoid circularity), computes composite scores vs per-benchmark medians across all vendors, and inserts fresh rows.
Parameters:
- session (
Session) – Active SQLModel session connected to the crawler database.
Returns:
int– The number of workload-profile rows inserted.