File tree Expand file tree Collapse file tree 4 files changed +9
-9
lines changed Expand file tree Collapse file tree 4 files changed +9
-9
lines changed Original file line number Diff line number Diff line change 480480 },
481481 "yaxes" : [
482482 {
483- "format" : " ns " ,
483+ "format" : " s " ,
484484 "label" : " Time" ,
485485 "logBase" : 1 ,
486486 "max" : null ,
555555 },
556556 "yaxes" : [
557557 {
558- "format" : " ns " ,
558+ "format" : " s " ,
559559 "label" : " Time" ,
560560 "logBase" : 1 ,
561561 "max" : null ,
630630 },
631631 "yaxes" : [
632632 {
633- "format" : " ns " ,
633+ "format" : " s " ,
634634 "label" : " Time" ,
635635 "logBase" : 1 ,
636636 "max" : null ,
705705 },
706706 "yaxes" : [
707707 {
708- "format" : " ns " ,
708+ "format" : " s " ,
709709 "label" : " Time" ,
710710 "logBase" : 1 ,
711711 "max" : null ,
15121512 "timezone" : " browser" ,
15131513 "title" : " kube-router" ,
15141514 "version" : 48
1515- }
1515+ }
Original file line number Diff line number Diff line change @@ -209,7 +209,7 @@ func (npc *NetworkPolicyController) Sync() error {
209209 defer func () {
210210 endTime := time .Since (start )
211211 if npc .MetricsEnabled {
212- metrics .ControllerIptablesSyncTime .WithLabelValues ().Set (float64 (endTime ))
212+ metrics .ControllerIptablesSyncTime .WithLabelValues ().Set (float64 (endTime . Seconds () ))
213213 }
214214 glog .V (1 ).Infof ("sync iptables took %v" , endTime )
215215 }()
Original file line number Diff line number Diff line change @@ -329,7 +329,7 @@ func (nsc *NetworkServicesController) publishMetrics(serviceInfoMap serviceInfoM
329329 defer func () {
330330 endTime := time .Since (start )
331331 glog .V (2 ).Infof ("Publishing IPVS metrics took %v" , endTime )
332- metrics .ControllerIpvsMetricsExportTime .WithLabelValues ().Set (float64 (endTime ))
332+ metrics .ControllerIpvsMetricsExportTime .WithLabelValues ().Set (float64 (endTime . Seconds () ))
333333 }()
334334
335335 ipvsSvcs , err := nsc .ln .ipvsGetServices ()
@@ -500,7 +500,7 @@ func (nsc *NetworkServicesController) syncIpvsServices(serviceInfoMap serviceInf
500500 defer func () {
501501 endTime := time .Since (start )
502502 if nsc .MetricsEnabled {
503- metrics .ControllerIpvsServicesSyncTime .WithLabelValues ().Set (float64 (endTime ))
503+ metrics .ControllerIpvsServicesSyncTime .WithLabelValues ().Set (float64 (endTime . Seconds () ))
504504 }
505505 glog .V (1 ).Infof ("sync ipvs services took %v" , endTime )
506506 }()
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ func (nrc *NetworkRoutingController) syncInternalPeers() {
2929 start := time .Now ()
3030 defer func () {
3131 endTime := time .Since (start )
32- metrics .ControllerBGPInternalPeersSyncTime .WithLabelValues ().Set (float64 (endTime ))
32+ metrics .ControllerBGPInternalPeersSyncTime .WithLabelValues ().Set (float64 (endTime . Seconds () ))
3333 glog .V (2 ).Infof ("Syncing BGP peers for the node took %v" , endTime )
3434 }()
3535
You can’t perform that action at this time.
0 commit comments