def get_seq_cut_off_parameters(cache_id: int, core_id: int): casadm_output = casadm.get_param_cutoff( cache_id, core_id, casadm.OutputFormat.csv).stdout.splitlines() seq_cut_off_params = SeqCutOffParameters() for line in casadm_output: if 'threshold' in line: seq_cut_off_params.threshold = line.split(',')[1] if 'policy' in line: seq_cut_off_params.policy = SeqCutOffPolicy(line.split(',')[1])
def get_seq_cut_off_parameters(cache_id: int, core_id: int): casadm_output = casadm.get_param_cutoff( cache_id, core_id, casadm.OutputFormat.csv).stdout.splitlines() seq_cut_off_params = SeqCutOffParameters() for line in casadm_output: if 'threshold' in line: seq_cut_off_params.threshold = Size(int(line.split(',')[1]), Unit.KibiByte) if 'policy' in line: seq_cut_off_params.policy = SeqCutOffPolicy.from_name(line.split(',')[1]) return seq_cut_off_params