Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for prometheusAPI (0.19 sec)

  1. istioctl/pkg/metrics/metrics.go

    	defer fw.Close()
    	dashboard.ClosePortForwarderOnInterrupt(fw)
    
    	log.Debugf("port-forward to prometheus pod ready")
    
    	promAPI, err := prometheusAPI(fmt.Sprintf("http://%s", fw.Address()))
    	if err != nil {
    		return fmt.Errorf("failure running port forward process: %v", err)
    	}
    
    	printHeader(c.OutOrStdout())
    
    	workloads := args
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Sat Apr 13 05:23:38 GMT 2024
    - 8.4K bytes
    - Viewed (0)
  2. istioctl/pkg/metrics/metrics_test.go

    	for i, c := range cases {
    		t.Run(fmt.Sprintf("case %d %s", i, strings.Join(c.Args, " ")), func(t *testing.T) {
    			testutil.VerifyOutput(t, metricCmd, c)
    		})
    	}
    }
    
    func TestAPI(t *testing.T) {
    	_, _ = prometheusAPI(fmt.Sprintf("http://localhost:%d", 1234))
    }
    
    var _ promv1.API = mockPromAPI{}
    
    func TestPrintMetrics(t *testing.T) {
    	mockProm := mockPromAPI{
    		cannedResponse: map[string]prometheus_model.Value{
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Wed Oct 25 02:07:44 GMT 2023
    - 7.9K bytes
    - Viewed (0)
Back to top