MCPcopy Create free account
hub / github.com/adny-code/fastgrind / _normalize_window

Method _normalize_window

tools/fastgrind.py:1228–1234  ·  view source on GitHub ↗
(self, start_ms: int | None, end_ms: int | None)

Source from the content-addressed store, hash-verified

1226 )
1227
1228 def _normalize_window(self, start_ms: int | None, end_ms: int | None) -> tuple[int, int]:
1229 default_start, default_end = self.default_window()
1230 start_tick = default_start if start_ms is None else _align_down(int(start_ms), self.reader.sample_interval_ms)
1231 end_tick = default_end if end_ms is None else _align_up(int(end_ms), self.reader.sample_interval_ms)
1232 if end_tick < start_tick:
1233 start_tick, end_tick = end_tick, start_tick
1234 return start_tick, end_tick
1235
1236 def _infer_split(self, split: str, thread_ids: Sequence[int], function_ids: Sequence[int]) -> str:
1237 if split != "auto":

Callers 6

query_seriesMethod · 0.95
top_functionsMethod · 0.95
stack_treeMethod · 0.95
export_html_snapshotMethod · 0.95
query_bundleMethod · 0.95

Calls 3

default_windowMethod · 0.95
_align_downFunction · 0.85
_align_upFunction · 0.85

Tested by

no test coverage detected