File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -615,10 +615,11 @@ func (server *Server) ReleaseCapacity(ctx context.Context, in *pb.ReleaseCapacit
615615 start := time .Now ()
616616 requests .WithLabelValues ("ReleaseCapacity" ).Inc ()
617617 defer func () {
618- defer log .V (2 ).Infof ("ReleaseCapacity res: %v" , out )
618+ log .V (2 ).Infof ("ReleaseCapacity res: %v" , out )
619+ requestDurations .WithLabelValues ("ReleaseCapacity" ).Observe (time .Since (start ).Seconds ())
619620 if err != nil {
620621 requestErrors .WithLabelValues ("ReleaseCapacity" ).Inc ()
621- requestDurations . WithLabelValues ( "ReleaseCapacity" ). Observe ( time . Since ( start ). Seconds ())
622+
622623 }
623624 }()
624625
@@ -678,10 +679,10 @@ func (server *Server) GetCapacity(ctx context.Context, in *pb.GetCapacityRequest
678679 start := time .Now ()
679680 requests .WithLabelValues ("GetCapacity" ).Inc ()
680681 defer func () {
681- defer log .V (2 ).Infof ("GetCapacity res: %v" , out )
682+ log .V (2 ).Infof ("GetCapacity res: %v" , out )
683+ requestDurations .WithLabelValues ("GetCapacity" ).Observe (time .Since (start ).Seconds ())
682684 if err != nil {
683685 requestErrors .WithLabelValues ("GetCapacity" ).Inc ()
684- requestDurations .WithLabelValues ("GetCapacity" ).Observe (time .Since (start ).Seconds ())
685686 }
686687 }()
687688
You can’t perform that action at this time.
0 commit comments