fn: Status should expose if data was served from cache. (#1123)

This is useful in scenarios where gRPC client might want
to reliably observe/report the status latency metrics
and remove any possible duplicates. If the status query
was served from cache, then these latencies show last
execution latency.
This commit is contained in:
Tolga Ceylan
2018-07-13 17:35:00 -07:00
committed by GitHub
parent 277a0beadf
commit 564db4e9d2
5 changed files with 54 additions and 41 deletions

View File

@@ -805,6 +805,7 @@ func (pr *pureRunner) handleStatusCall(ctx context.Context) (*runner.RunnerStatu
pr.status.lock.Unlock()
cacheObj.Cached = true
cacheObj.Active = atomic.LoadInt32(&pr.status.inflight)
return &cacheObj, nil
}