Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Source file analysis_config.ml
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172(** A module internal to [Core_bench]. Please look at {!Bench}. *)openCoretypet={regression_name:stringoption;responder:Variable.t;predictors:Variable.tlist;bootstrap_trials:int;r_square:bool;}letcreate~responder~predictors?(bootstrap_trials=0)?(r_square=false)?regression_name()={responder;predictors;bootstrap_trials;r_square;regression_name;}letvs_runsresponder()=create~responder~predictors:[`Runs]()letvs_runs_overheadresponder()=create~responder~predictors:[`Runs;`One]()letnanos_vs_runs=vs_runs`Nanos()letcycles_vs_runs=vs_runs`Cycles()letallocations_vs_runs=[vs_runs_overhead`Minor_allocated();vs_runs_overhead`Major_allocated();vs_runs_overhead`Promoted();]letgc_vs_runs=[vs_runs`Minor_collections();vs_runs`Major_collections();vs_runs`Compactions();]letnanos~predictors=create~responder:`Nanos~predictors()letcycles~predictors=create~responder:`Cycles~predictors()(* This includes a lot of things. *)letdefault=[nanos_vs_runs]@allocations_vs_runs@gc_vs_runsletdefault_bootstrap_trials=3000letdefault_reduced_bootstrap_trials=300letwith_error_estimation?(bootstrap_trials=default_bootstrap_trials)t={twithbootstrap_trials;r_square=true}letreduce_bootstrapt~bootstrap_trials=ift.bootstrap_trials>bootstrap_trialsthen{twithbootstrap_trials;}elsetletmake_keyt=letinit=((Variable.to_intt.responder)lslVariable.max_int)in(List.fold~initt.predictors~f:(funaccpred->(1lsl(Variable.to_intpred))+acc))letparse?regression_namestr=letstr,bootstrap_trials,r_square=matchString.chop_prefixstr~prefix:"+"with|None->str,0,false|Somestr->str,default_bootstrap_trials,trueinmatchString.lsplit2str~on:':'with|None->failwith"Regression string should have format <responder:predictors>."|Some(resp,preds)->letpreds=String.splitpreds~on:','inletresponder=Variable.of_short_stringrespinletpredictors=List.mappreds~f:Variable.of_short_stringincreate~responder~predictors~bootstrap_trials~r_square?regression_name()