Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for printMetrics (0.12 sec)

  1. istioctl/pkg/metrics/metrics.go

    	for _, workload := range workloads {
    		sm, err := metrics(promAPI, workload, metricsDuration)
    		if err != nil {
    			return fmt.Errorf("could not build metrics for workload '%s': %v", workload, err)
    		}
    
    		printMetrics(c.OutOrStdout(), sm)
    	}
    	return nil
    }
    
    func prometheusAPI(address string) (promv1.API, error) {
    	promClient, err := api.NewClient(api.Config{Address: address})
    	if err != nil {
    Registered: Wed Nov 06 22:53:10 UTC 2024
    - Last Modified: Sat Apr 13 05:23:38 UTC 2024
    - 8.4K bytes
    - Viewed (0)
  2. istioctl/pkg/metrics/metrics_test.go

    		},
    	}
    	workload := "details"
    
    	sm, err := metrics(mockProm, workload, time.Minute)
    	if err != nil {
    		t.Fatalf("Unwanted exception %v", err)
    	}
    
    	var out bytes.Buffer
    	printHeader(&out)
    	printMetrics(&out, sm)
    	output := out.String()
    
    	expectedOutput := `                                  WORKLOAD    TOTAL RPS    ERROR RPS  P50 LATENCY  P90 LATENCY  P99 LATENCY
    Registered: Wed Nov 06 22:53:10 UTC 2024
    - Last Modified: Fri Aug 16 01:35:47 UTC 2024
    - 8K bytes
    - Viewed (0)
Back to top