Lines Matching refs:db

189     global db
190 db = dict()
191 db["running"] = dict()
192 db["cpu"] = dict()
193 db["tid"] = dict()
194 db["global"] = []
196 db["task_info"] = dict()
197 db["runtime_info"] = dict()
199 db["task_info"]["pid"] = len("PID")
200 db["task_info"]["tid"] = len("TID")
201 db["task_info"]["comm"] = len("Comm")
202 db["runtime_info"]["runs"] = len("Runs")
203 db["runtime_info"]["acc"] = len("Accumulated")
204 db["runtime_info"]["max"] = len("Max")
205 db["runtime_info"]["max_at"] = len("Max At")
206 db["runtime_info"]["min"] = len("Min")
207 db["runtime_info"]["mean"] = len("Mean")
208 db["runtime_info"]["median"] = len("Median")
210 db["inter_times"] = dict()
211 db["inter_times"]["out_in"] = len("Out-In")
212 db["inter_times"]["inter_at"] = len("At")
213 db["inter_times"]["out_out"] = len("Out-Out")
214 db["inter_times"]["in_in"] = len("In-In")
215 db["inter_times"]["in_out"] = len("In-Out")
330 fmt = " {{:^{}}}".format(sum(db["task_info"].values()))
332 sum(db["runtime_info"].values()) - 2 * decimal_precision
338 sum(db["inter_times"].values()) - 4 * decimal_precision
352 fmt = "{{:>{}}}".format(db["task_info"]["pid"] * fix_csv_align)
353 fmt += "{}{{:>{}}}".format(separator, db["task_info"]["tid"] * fix_csv_align)
354 fmt += "{}{{:>{}}}".format(separator, db["task_info"]["comm"] * fix_csv_align)
355 fmt += "{}{{:>{}}}".format(separator, db["runtime_info"]["runs"] * fix_csv_align)
356 fmt += "{}{{:>{}}}".format(separator, db["runtime_info"]["acc"] * fix_csv_align)
357 fmt += "{}{{:>{}}}".format(separator, db["runtime_info"]["mean"] * fix_csv_align)
359 separator, db["runtime_info"]["median"] * fix_csv_align
362 separator, (db["runtime_info"]["min"] - decimal_precision) * fix_csv_align
365 separator, (db["runtime_info"]["max"] - decimal_precision) * fix_csv_align
368 separator, (db["runtime_info"]["max_at"] - time_precision) * fix_csv_align
378 (db["inter_times"]["out_in"] - decimal_precision) * fix_csv_align
382 (db["inter_times"]["inter_at"] - time_precision) * fix_csv_align
386 (db["inter_times"]["out_out"] - decimal_precision) * fix_csv_align
390 (db["inter_times"]["in_in"] - decimal_precision) * fix_csv_align
394 (db["inter_times"]["in_out"] - decimal_precision) * fix_csv_align
405 for tid in sorted(db["tid"]):
412 for task in db["tid"][tid]:
454 len_pid = db["task_info"]["pid"] * fix_csv_align
455 len_tid = db["task_info"]["tid"] * fix_csv_align
456 len_comm = db["task_info"]["comm"] * fix_csv_align
457 len_runs = db["runtime_info"]["runs"] * fix_csv_align
458 len_acc = db["runtime_info"]["acc"] * fix_csv_align
459 len_mean = db["runtime_info"]["mean"] * fix_csv_align
460 len_median = db["runtime_info"]["median"] * fix_csv_align
461 len_min = (db["runtime_info"]["min"] - decimal_precision) * fix_csv_align
462 len_max = (db["runtime_info"]["max"] - decimal_precision) * fix_csv_align
463 len_max_at = (db["runtime_info"]["max_at"] - time_precision) * fix_csv_align
466 db["inter_times"]["out_in"] - decimal_precision
469 db["inter_times"]["inter_at"] - time_precision
472 db["inter_times"]["out_out"] - decimal_precision
474 len_in_in = (db["inter_times"]["in_in"] - decimal_precision) * fix_csv_align
476 db["inter_times"]["in_out"] - decimal_precision
506 for key in db["task_info"]:
507 if len(str(getattr(align_helper, key))) > db["task_info"][key]:
508 db["task_info"][key] = len(str(getattr(align_helper, key)))
509 for key in db["runtime_info"]:
510 if len(str(getattr(align_helper, key))) > db["runtime_info"][key]:
511 db["runtime_info"][key] = len(str(getattr(align_helper, key)))
513 for key in db["inter_times"]:
514 if len(str(getattr(align_helper, key))) > db["inter_times"][key]:
515 db["inter_times"][key] = len(str(getattr(align_helper, key)))
662 if task.tid in db["tid"]:
664 last_tid_task = db["tid"][task.tid][-1]
702 if tid not in db["tid"]:
703 db["tid"][tid] = []
704 db["tid"][tid].append(task)
705 _record_cleanup(db["tid"][tid])
710 if cpu not in db["cpu"]:
711 db["cpu"][cpu] = []
712 db["cpu"][cpu].append(task)
713 _record_cleanup(db["cpu"][cpu])
718 db["global"].append(task)
719 _record_cleanup(db["global"])
726 if _id not in db["running"]:
733 task = db["running"][_id]
741 del db["running"][_id]
758 if _id in db["running"]:
764 assert _id not in db["running"]
767 db["running"][_id] = task