mirror of
https://gitlab.cern.ch/wotsubo/PSBoardDataBase.git
synced 2025-06-08 05:55:42 +09:00
update(DispatchChecker): add new criteria for campaign 6
New THRESHOLD_INSUFFICIENT_RESET_WITH_10 (from 10 to 5) #16
This commit is contained in:
parent
2aedfaf380
commit
4924c5fdd6
1 changed files with 20 additions and 5 deletions
|
@ -24,16 +24,19 @@ mutable struct DbConnection
|
|||
db::SQLite.DB
|
||||
df_single_result::DataFrame
|
||||
df_extra_results::DataFrame
|
||||
df_runs::DataFrame
|
||||
function DbConnection(db::SQLite.DB)
|
||||
df_single_results =
|
||||
DBInterface.execute(db, sql"select * from qaqc_single_run_results") |> DataFrame
|
||||
df_extra_results =
|
||||
DBInterface.execute(db, sql"select * from qaqc_extra_run_results") |> DataFrame
|
||||
new(db, df_single_results, df_extra_results)
|
||||
df_runs = DBInterface.execute(db, sql"select * from qaqc_runs") |> DataFrame
|
||||
new(db, df_single_results, df_extra_results, df_runs)
|
||||
end
|
||||
end
|
||||
|
||||
THRESHOLD_INSUFFICIENT_RESET_WITH_10 = 0.1
|
||||
THRESHOLD_INSUFFICIENT_RESET_WITH_10_CAMPAIGN_1to5 = 0.1
|
||||
THRESHOLD_INSUFFICIENT_RESET_WITH_10_CAMPAIGN_6 = 0.05
|
||||
THRESHOLD_RESET_FAILED_THOUGH_RECONFIG_DONE = 0.1
|
||||
THRESHOLD_ALWAYS_HIT_FLAG_TRUE = 0.1
|
||||
THRESHOLD_BCID_FAIL = 0.1
|
||||
|
@ -75,9 +78,21 @@ function is_dispatchable(conn::DbConnection, psbid::Int64)
|
|||
nrow(extra_results) == 1 && let
|
||||
extra_result = Tables.rowtable(extra_results) |> first
|
||||
f1 =
|
||||
!ismissing(extra_result.insufficient_reset_with_10) &&
|
||||
extra_result.insufficient_reset_with_10 >=
|
||||
extra_result.num_tests * THRESHOLD_INSUFFICIENT_RESET_WITH_10
|
||||
!ismissing(extra_result.insufficient_reset_with_10) && begin
|
||||
campaign_id =
|
||||
filter(:id => ==(extra_result.runid), conn.df_runs).campaign_id
|
||||
@assert length(campaign_id) == 1
|
||||
campaign_id = first(campaign_id)
|
||||
if campaign_id ≤ 5
|
||||
extra_result.insufficient_reset_with_10 >=
|
||||
extra_result.num_tests *
|
||||
THRESHOLD_INSUFFICIENT_RESET_WITH_10_CAMPAIGN_1to5
|
||||
else
|
||||
extra_result.insufficient_reset_with_10 >=
|
||||
extra_result.num_tests *
|
||||
THRESHOLD_INSUFFICIENT_RESET_WITH_10_CAMPAIGN_6
|
||||
end
|
||||
end
|
||||
f2 =
|
||||
!ismissing(extra_result.reset_failed_though_reconfig_done) &&
|
||||
extra_result.reset_failed_though_reconfig_done >=
|
||||
|
|
Loading…
Add table
Reference in a new issue