MCPcopy Index your code
hub / github.com/handsontable/handsontable / nextEventStartInRunTask

Function nextEventStartInRunTask

performance-tests/trace-parser.mjs:668–688  ·  view source on GitHub ↗
(ts, runTaskEnd)

Source from the content-addressed store, hash-verified

666
667 // Find the next event start after ts within the same RunTask
668 function nextEventStartInRunTask(ts, runTaskEnd) {
669 // Binary search for first event start > ts
670 let lo = 0; let
671 hi = nonRunTaskEventStarts.length;
672
673 while (lo < hi) {
674 const mid = Math.floor((lo + hi) / 2);
675
676 if (nonRunTaskEventStarts[mid] <= ts) {
677 lo = mid + 1;
678 } else {
679 hi = mid;
680 }
681 }
682 // lo is the index of the first event start > ts
683 if (lo < nonRunTaskEventStarts.length && nonRunTaskEventStarts[lo] < runTaskEnd) {
684 return nonRunTaskEventStarts[lo];
685 }
686
687 return runTaskEnd;
688 }
689
690 // Find RunTask end for a given timestamp
691 function getRunTaskEnd(ts) {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…