Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for printMetrics (0.1 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: Fri Jun 14 15:00:06 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: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Oct 25 02:07:44 UTC 2023
    - 7.9K bytes
    - Viewed (0)
Back to top