Skip to content

Commit

Permalink
Switch to mode 0 due to #1089 bug
Browse files Browse the repository at this point in the history
  • Loading branch information
willGraham01 committed Sep 4, 2023
1 parent 71c6ea5 commit c9f92a3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/scripts/profiling/_parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"disable_health_system": False,
"disable_spurious_symptoms": False,
"capabilities_coefficient": None,
"mode_appt_constraints": 2,
"mode_appt_constraints": 0, # 2,
"save_final_population": False,
"record_hsi_event_details": False,
}
11 changes: 10 additions & 1 deletion src/scripts/profiling/run_profiling.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def run_profiling(
write_pyis: bool = True,
write_html: bool = False,
write_json: bool = False,
interval: float = 1e-1,
) -> None:
# Suppress "ignore" warnings
warnings.filterwarnings("ignore")
Expand All @@ -52,7 +53,7 @@ def run_profiling(
# combining the recorded sessions into one at the end.
# As such, the same profiler can be used to record the profile of multiple scripts,
# however this may create large datafiles so using separate profilers is preferable
p = Profiler(interval=1e-1)
p = Profiler(interval=interval)

print(f"[{current_time('%H:%M:%S')}:INFO] Starting profiling runs")

Expand Down Expand Up @@ -116,6 +117,14 @@ def run_profiling(
help="Name to give to the output file(s). File extensions will automatically appended.",
default=None,
)
parser.add_argument(
"-i",
"--interval-seconds",
dest="interval",
type=float,
help="Interval in seconds between capture frames for profiling.",
default=1e-1,
)

args = parser.parse_args()
run_profiling(**vars(args))

0 comments on commit c9f92a3

Please sign in to comment.