activity_state.pb.go ×2

Frontier kind: Joint frontier

unlabeled · c_c69509fc606a

1 test · 2512 LOC · 124 files · introduces 1 test · 36 LOC · 3 files

Introduces — evidence that enters the hierarchy at this concept

Code
4 ranges36 lines · 3 files
Tests
1 test

Contains — complete concept membership

All code (extent)
391 ranges2512 lines · 124 files · Browse complete extent
All tests (intent)
1 testBrowse 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.

1 test introduced at this concept.

Introduced code

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

3 files ranked by introduced lines: 36 introduced LOC across 4 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/chasm/lib/activity/statemachine.go 18 introduced LOC · 1 range

Open complete file

195 },
196 activitypb.ACTIVITY_EXECUTION_STATUS_COMPLETED,
197 > func(a *Activity, ctx chasm.MutableContext, event completeEvent) error { statemachine.go
198 > return a.StoreOrSelf(ctx).RecordCompleted(ctx, func(ctx chasm.MutableContext) error {
199 > req := event.req.GetCompleteRequest()
200 >
201 > attempt := a.LastAttempt.Get(ctx)
202 > attempt.CompleteTime = timestamppb.New(ctx.Now(a))
203 > attempt.LastWorkerIdentity = req.GetIdentity()
204 > outcome := a.Outcome.Get(ctx)
205 > outcome.Variant = &activitypb.ActivityOutcome_Successful_{
206 > Successful: &activitypb.ActivityOutcome_Successful{
207 > Output: req.GetResult(),
208 > },
209 > }
210 >
211 > a.emitOnCompletedMetrics(ctx, event.metricsHandler)
212 >
213 > return nil
214 > })
215 },
216 )
go.temporal.io/server/chasm/lib/activity/activity.go 12 introduced LOC · 1 range

Open complete file

1972 }
1973
1974 > func (a *Activity) emitOnCompletedMetrics(ctx chasm.Context, handler metrics.Handler) { activity.go
1975 > attempt := a.LastAttempt.Get(ctx)
1976 > startedTime := attempt.GetStartedTime().AsTime()
1977 >
1978 > startToCloseLatency := time.Since(startedTime)
1979 > metrics.ActivityStartToCloseLatency.With(handler).Record(startToCloseLatency)
1980 >
1981 > scheduleToCloseLatency := time.Since(a.GetScheduleTime().AsTime())
1982 > metrics.ActivityScheduleToCloseLatency.With(handler).Record(scheduleToCloseLatency)
1983 >
1984 > metrics.ActivitySuccess.With(handler).Record(1)
1985 > }
1986
1987 func (a *Activity) emitOnFailedMetrics(ctx chasm.Context, handler metrics.Handler) {
go.temporal.io/server/chasm/lib/activity/gen/activitypb/v1/activity_state.pb.go 6 introduced LOC · 2 ranges

Open complete file

1020 if x != nil {
1021 if x, ok := x.Variant.(*ActivityOutcome_Successful_); ok {
1022 > return x.Successful activity_state.pb.go
1023 > }
1024 }
1025 return nil
1142 }
1143
1144 > func (x *ActivityOutcome_Successful) GetOutput() *v1.Payloads { activity_state.pb.go
1145 > if x != nil {
1146 > return x.Output
1147 > }
1148 return nil
1149 }