@@ -49,17 +49,17 @@ const componentName = "updater"
4949
5050// Metrics holds metrics relevant to the Updater.
5151type Metrics struct {
52- UpdateState metrics.Cyclic
53- DelaySeconds metrics.Duration
54- MoreCounter metrics.Counter
52+ UpdateState metrics.Cyclic
53+ DelaySeconds metrics.Duration
54+ IncompleteUpdates metrics.Counter
5555}
5656
5757// CreateMetrics creates metrics for this controller
5858func CreateMetrics (factory metrics.Factory ) * Metrics {
5959 return & Metrics {
60- UpdateState : factory .NewCyclic (componentName ),
61- DelaySeconds : factory .NewDuration ("delay" , "Seconds updater is behind schedule" , "component" ),
62- MoreCounter : factory .NewCounter ("counter" , "number of unread columns" ),
60+ UpdateState : factory .NewCyclic (componentName ),
61+ DelaySeconds : factory .NewDuration ("delay" , "Seconds updater is behind schedule" , "component" ),
62+ IncompleteUpdates : factory .NewCounter ("counter" , "number of unread columns" ),
6363 }
6464}
6565
@@ -90,7 +90,7 @@ func (mets *Metrics) start() *metrics.CycleReporter {
9090type GroupUpdater func (parent context.Context , log logrus.FieldLogger , client gcs.Client , tg * configpb.TestGroup , gridPath gcs.Path ) (bool , error )
9191
9292// GCS returns a GCS-based GroupUpdater, which knows how to process result data stored in GCS.
93- func GCS (poolCtx context.Context , colClient gcs.Client , groupTimeout , buildTimeout time.Duration , concurrency int , write bool , enableIgnoreSkip bool ) GroupUpdater {
93+ func GCS (poolCtx context.Context , colClient gcs.Client , mets * Metrics , groupTimeout , buildTimeout time.Duration , concurrency int , write bool , enableIgnoreSkip bool ) GroupUpdater {
9494 var readResult * resultReader
9595 if poolCtx == nil {
9696 // TODO(fejta): remove check soon
@@ -107,7 +107,7 @@ func GCS(poolCtx context.Context, colClient gcs.Client, groupTimeout, buildTimeo
107107 defer cancel ()
108108 gcsColReader := gcsColumnReader (colClient , buildTimeout , readResult , enableIgnoreSkip )
109109 reprocess := 20 * time .Minute // allow 20m for prow to finish uploading artifacts
110- return InflateDropAppend (ctx , log , client , tg , gridPath , write , gcsColReader , reprocess )
110+ return InflateDropAppend (ctx , log , client , tg , gridPath , write , gcsColReader , reprocess , mets )
111111 }
112112}
113113
@@ -733,7 +733,7 @@ func InflateDropAppend(ctx context.Context, alog logrus.FieldLogger, client gcs.
733733 }
734734 if unreadColumns {
735735 log = log .WithField ("more" , true )
736- mets .MoreCounter .Add (1 )
736+ mets .IncompleteUpdates .Add (1 )
737737 }
738738 log .WithFields (logrus.Fields {
739739 "cols" : len (grid .Columns ),
0 commit comments