slice.go ×6

Frontier kind: Code frontier

unlabeled · c_fe699c0ae769

18 tests · 2656 LOC · 133 files · introduces 0 tests · 24 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
9 ranges24 lines · 2 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
405 ranges2656 lines · 133 files · Browse complete extent
All tests (intent)
18 testsBrowse complete intent

Neighbourhood graph

The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.

Introduced files, introduced tests, and structurally relevant concept specialization

In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the native relationship evidence on this page.

Graph controls are ready.

Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.

Native relationship evidence

Every exact file and test below is linked only from the concept that introduces it.

Introduced tests

Every collected test enters the hierarchy at exactly one concept.

No tests are introduced at this concept. Its intent tests are introduced by other concepts.

Introduced code

Every collected source range enters the hierarchy at exactly one concept.

2 files ranked by introduced lines: 24 introduced LOC across 9 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/service/history/queues/slice.go 16 introduced LOC · 6 ranges

Open complete file

227 }
228
229 > func (s *SliceImpl) mergeIterators(incomingSlice *SliceImpl) []Iterator { slice.go
230 > mergedIterators := make([]Iterator, 0, len(s.iterators)+len(incomingSlice.iterators))
231 > currentIterIdx := 0
232 > incomingIterIdx := 0
233 > for currentIterIdx < len(s.iterators) && incomingIterIdx < len(incomingSlice.iterators) {
234 currentIter := s.iterators[currentIterIdx]
235 incomingIter := incomingSlice.iterators[incomingIterIdx]
244 }
245
246 > for _, iterator := range s.iterators[currentIterIdx:] { slice.go
247 mergedIterators = s.appendIterator(mergedIterators, iterator)
248 }
249 > for _, iterator := range incomingSlice.iterators[incomingIterIdx:] { slice.go
250 mergedIterators = s.appendIterator(mergedIterators, iterator)
251 }
252
253 > validateIteratorsOrderedDisjoint(mergedIterators) slice.go
254 >
255 > return mergedIterators
256 }
257
259 iterators []Iterator,
260 iterator Iterator,
261 > ) []Iterator { slice.go
262 > if len(iterators) == 0 {
263 > return []Iterator{iterator}
264 > }
265
266 size := len(iterators)
496 func validateIteratorsOrderedDisjoint(
497 iterators []Iterator,
498 > ) { slice.go
499 > if len(iterators) <= 1 {
500 return
501 }
go.temporal.io/server/service/history/queues/tracker.go 8 introduced LOC · 3 ranges

Open complete file

57 }
58
59 > func (t *executableTracker) merge(incomingTracker *executableTracker) *executableTracker { tracker.go
60 > thisExecutables, thisPendingTasks := t.pendingExecutables, t.pendingPerKey
61 > thatExecutables, thatPendingTasks := incomingTracker.pendingExecutables, incomingTracker.pendingPerKey
62 > if len(thisExecutables) < len(thatExecutables) {
63 thisExecutables, thatExecutables = thatExecutables, thisExecutables
64 thisPendingTasks = thatPendingTasks
65 }
66
67 > for key, executable := range thatExecutables { tracker.go
68 thisExecutables[key] = executable
69 key := t.grouper.Key(executable)
70 thisPendingTasks[key]++
71 }
72 > t.pendingExecutables = thisExecutables tracker.go
73 > t.pendingPerKey = thisPendingTasks
74 > return t
75 }
76