@@ -12,7 +12,7 @@ use crate::db::platform::{
1212} ;
1313use crate :: matching:: name_parse:: { ParsedName , parse_name} ;
1414use crate :: matching:: scoring:: {
15- CandidateGate , CandidateScore , Selection , gate_and_score, pick_best,
15+ CandidateGate , CandidateScore , Selection , gate_and_score, pick_best, record_pick_best ,
1616} ;
1717use crate :: matching:: util:: { clean_name, normalize_title} ;
1818use crate :: providers:: MetadataProvider ;
@@ -150,7 +150,11 @@ fn match_game_to_launchbox(
150150 & db_conn,
151151 & mut redis_conn,
152152 & game,
153- pick_best ( scored. iter ( ) . map ( |s| ( s, s. score ) ) ) ,
153+ record_pick_best (
154+ "launchbox" ,
155+ "direct" ,
156+ pick_best ( scored. iter ( ) . map ( |s| ( s, s. score ) ) ) ,
157+ ) ,
154158 AutomaticMatchReasonEnum :: DirectName ,
155159 "Direct Match" ,
156160 )
@@ -171,7 +175,11 @@ fn match_game_to_launchbox(
171175 & db_conn,
172176 & mut redis_conn,
173177 & game,
174- pick_best ( scored. iter ( ) . map ( |s| ( s, s. score ) ) ) ,
178+ record_pick_best (
179+ "launchbox" ,
180+ "alternative" ,
181+ pick_best ( scored. iter ( ) . map ( |s| ( s, s. score ) ) ) ,
182+ ) ,
175183 AutomaticMatchReasonEnum :: AlternativeName ,
176184 "Alternative Name" ,
177185 )
@@ -191,7 +199,11 @@ fn match_game_to_launchbox(
191199 & db_conn,
192200 & mut redis_conn,
193201 & game,
194- pick_best ( scored. iter ( ) . map ( |s| ( s, s. score ) ) ) ,
202+ record_pick_best (
203+ "launchbox" ,
204+ "normalized" ,
205+ pick_best ( scored. iter ( ) . map ( |s| ( s, s. score ) ) ) ,
206+ ) ,
195207 AutomaticMatchReasonEnum :: NormalizedName ,
196208 "Normalized Match" ,
197209 )
@@ -212,7 +224,11 @@ fn match_game_to_launchbox(
212224 & db_conn,
213225 & mut redis_conn,
214226 & game,
215- pick_best ( scored. iter ( ) . map ( |s| ( s, s. score ) ) ) ,
227+ record_pick_best (
228+ "launchbox" ,
229+ "normalized_alternative" ,
230+ pick_best ( scored. iter ( ) . map ( |s| ( s, s. score ) ) ) ,
231+ ) ,
216232 AutomaticMatchReasonEnum :: NormalizedAlternativeName ,
217233 "Normalized Alternative Name" ,
218234 )
@@ -365,7 +381,11 @@ pub fn match_game_via_sibling_name_launchbox(
365381 & mut redis_conn,
366382 & game,
367383 & sibling,
368- pick_best ( scored. iter ( ) . map ( |s| ( s, s. score ) ) ) ,
384+ record_pick_best (
385+ "launchbox" ,
386+ "cross_direct" ,
387+ pick_best ( scored. iter ( ) . map ( |s| ( s, s. score ) ) ) ,
388+ ) ,
369389 AutomaticMatchReasonEnum :: CrossProviderDirectName ,
370390 "Direct" ,
371391 )
@@ -387,7 +407,11 @@ pub fn match_game_via_sibling_name_launchbox(
387407 & mut redis_conn,
388408 & game,
389409 & sibling,
390- pick_best ( scored. iter ( ) . map ( |s| ( s, s. score ) ) ) ,
410+ record_pick_best (
411+ "launchbox" ,
412+ "cross_alternative" ,
413+ pick_best ( scored. iter ( ) . map ( |s| ( s, s. score ) ) ) ,
414+ ) ,
391415 AutomaticMatchReasonEnum :: CrossProviderDirectName ,
392416 "Direct alt" ,
393417 )
@@ -405,7 +429,11 @@ pub fn match_game_via_sibling_name_launchbox(
405429 & mut redis_conn,
406430 & game,
407431 & sibling,
408- pick_best ( scored. iter ( ) . map ( |s| ( s, s. score ) ) ) ,
432+ record_pick_best (
433+ "launchbox" ,
434+ "cross_normalized" ,
435+ pick_best ( scored. iter ( ) . map ( |s| ( s, s. score ) ) ) ,
436+ ) ,
409437 AutomaticMatchReasonEnum :: CrossProviderNormalizedName ,
410438 "Normalized" ,
411439 )
@@ -428,7 +456,11 @@ pub fn match_game_via_sibling_name_launchbox(
428456 & mut redis_conn,
429457 & game,
430458 & sibling,
431- pick_best ( scored. iter ( ) . map ( |s| ( s, s. score ) ) ) ,
459+ record_pick_best (
460+ "launchbox" ,
461+ "cross_normalized_alternative" ,
462+ pick_best ( scored. iter ( ) . map ( |s| ( s, s. score ) ) ) ,
463+ ) ,
432464 AutomaticMatchReasonEnum :: CrossProviderNormalizedName ,
433465 "Normalized alt" ,
434466 )
0 commit comments