tasks.pb.go ×10

Frontier kind: Code frontier

unlabeled · c_cc43c09213e0

42 tests · 2669 LOC · 136 files · introduces 0 tests · 40 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
12 ranges40 lines · 2 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
403 ranges2669 lines · 136 files · Browse complete extent
All tests (intent)
42 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: 40 introduced LOC across 12 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/service/matching/scale_manager.go 25 introduced LOC · 2 ranges

Open complete file

446 }
447
448 > func scaleStateToReadCount(scaleState *persistencespb.PartitionScaleState) int32 { scale_manager.go
449 > return max(scaleState.GetTarget(), bitSet(scaleState.GetBacklogState()).len())
450 > }
451
452 func scaleStateToInfo(
453 scaleState *persistencespb.PartitionScaleState,
454 settings dynamicconfig.PartitionScaleManagerSettings,
455 > ) *taskqueuespb.PartitionScaleInfo { scale_manager.go
456 > // note if scaleState == nil, read and write will both be 0
457 > read := scaleStateToReadCount(scaleState)
458 > allowedShrink := max(
459 > 1,
460 > min(
461 > int32(float32(read)*settings.ShrinkRatio),
462 > settings.ShrinkDelta,
463 > ),
464 > )
465 > write := max(
466 > scaleState.GetTarget(),
467 > read-allowedShrink,
468 > )
469 > return &taskqueuespb.PartitionScaleInfo{
470 > Read: read,
471 > Write: write,
472 > BacklogCounts: scaleState.GetBacklogCounts(),
473 > BacklogCap: scaleState.GetBacklogCap(),
474 > Version: scaleState.GetTargetVersion(),
475 > }
476 > }
go.temporal.io/server/api/persistence/v1/tasks.pb.go 15 introduced LOC · 10 ranges

Open complete file

617 }
618
619 > func (x *PartitionScaleState) GetTarget() int32 { tasks.pb.go
620 > if x != nil {
621 return x.Target
622 }
623 > return 0 tasks.pb.go
624 }
625
631 }
632
633 > func (x *PartitionScaleState) GetTargetVersion() int64 { tasks.pb.go
634 > if x != nil {
635 return x.TargetVersion
636 }
637 > return 0 tasks.pb.go
638 }
639
640 > func (x *PartitionScaleState) GetBacklogState() []uint64 { tasks.pb.go
641 > if x != nil {
642 return x.BacklogState
643 }
644 > return nil tasks.pb.go
645 }
646
647 > func (x *PartitionScaleState) GetBacklogCounts() []byte { tasks.pb.go
648 > if x != nil {
649 return x.BacklogCounts
650 }
651 > return nil tasks.pb.go
652 }
653
654 > func (x *PartitionScaleState) GetBacklogCap() int32 { tasks.pb.go
655 > if x != nil {
656 return x.BacklogCap
657 }
658 > return 0 tasks.pb.go
659 }
660