Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 118 for counter (0.24 sec)

  1. internal/http/server.go

    	listener        *httpListener // HTTP listener for all 'Addrs' field.
    	inShutdown      uint32        // indicates whether the server is in shutdown or not
    	requestCount    int32         // counter holds no. of request in progress.
    }
    
    // GetRequestCount - returns number of request in progress.
    func (srv *Server) GetRequestCount() int {
    	return int(atomic.LoadInt32(&srv.requestCount))
    }
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Feb 09 21:25:16 GMT 2024
    - 7.7K bytes
    - Viewed (0)
  2. cni/pkg/nodeagent/pod_cache_test.go

    	if !reflect.DeepEqual(netns1, netns2) {
    		t.Fatalf("Expected the same Netns for the same uid, got %v and %v", netns1, netns2)
    	}
    
    	if counter.Load() != 2 {
    		t.Fatalf("Expected openNetns to be called twice, got %d", counter.Load())
    	}
    }
    
    func TestUpsertPodCacheWithNewInode(t *testing.T) {
    	counter.Store(0)
    
    	p := newPodNetnsCache(openNsTestOverrideWithInodes(1, 2))
    
    	pod := &corev1.Pod{ObjectMeta: metav1.ObjectMeta{UID: "testUID"}}
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Fri Apr 12 21:47:31 GMT 2024
    - 4.2K bytes
    - Viewed (0)
  3. tests/non_std_test.go

    	DB.First(&animal, animal.Counter)
    	if animal.Name != "galeone" {
    		t.Errorf("Name fields shouldn't be changed if untouched, but got %v", animal.Name)
    	}
    
    	// When changing a field with a default value, the change must occur
    	animal.Name = "amazing horse"
    	DB.Save(&animal)
    	DB.First(&animal, animal.Counter)
    	if animal.Name != "amazing horse" {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Jan 06 07:02:53 GMT 2022
    - 1.9K bytes
    - Viewed (0)
  4. cmd/erasure-utils.go

    	}
    
    	// Do we have enough data?
    	if int64(getDataBlockLen(enBlocks, dataBlocks)) < length {
    		return 0, reedsolomon.ErrShortData
    	}
    
    	// Counter to decrement total left to write.
    	write := length
    
    	// Counter to increment total written.
    	var totalWritten int64
    
    	// Write all data blocks to dst.
    	for _, block := range enBlocks[:dataBlocks] {
    		// Skip blocks until we have reached our offset.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Jan 31 02:11:45 GMT 2024
    - 3.1K bytes
    - Viewed (0)
  5. cmd/xl-storage-free-version_test.go

    		t.Helper()
    		if err != nil {
    			t.Fatal(err)
    		}
    	}
    
    	// Add a version with tiered content, one with local content
    	xl := xlMetaV2{}
    	counter := 1
    	report := func() {
    		t.Helper()
    		// t.Logf("versions (%d): len = %d", counter, len(xl.versions))
    		counter++
    	}
    	fi := FileInfo{
    		Volume:           "volume",
    		Name:             "object-name",
    		VersionID:        "00000000-0000-0000-0000-000000000001",
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sat Mar 02 05:11:03 GMT 2024
    - 7.8K bytes
    - Viewed (0)
  6. cmd/http-stats.go

    	sync.RWMutex
    }
    
    // Inc increments the api stats counter.
    func (stats *HTTPAPIStats) Inc(api string) {
    	if stats == nil {
    		return
    	}
    	stats.Lock()
    	defer stats.Unlock()
    	if stats.apiStats == nil {
    		stats.apiStats = make(map[string]int)
    	}
    	stats.apiStats[api]++
    }
    
    // Dec increments the api stats counter.
    func (stats *HTTPAPIStats) Dec(api string) {
    	if stats == nil {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Mar 10 09:15:15 GMT 2024
    - 11.4K bytes
    - Viewed (0)
  7. cmd/metrics-v3-types.go

    type MetricType int
    
    const (
    	// CounterMT - represents a counter metric.
    	CounterMT MetricType = iota
    	// GaugeMT - represents a gauge metric.
    	GaugeMT
    	// HistogramMT - represents a histogram metric.
    	HistogramMT
    )
    
    func (mt MetricType) String() string {
    	switch mt {
    	case CounterMT:
    		return "counter"
    	case GaugeMT:
    		return "gauge"
    	case HistogramMT:
    		return "histogram"
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Apr 30 15:05:22 GMT 2024
    - 14.7K bytes
    - Viewed (0)
  8. cmd/erasure-healing-common.go

    	}
    
    	maxima = 0 // Counter for remembering max occurrence of elements.
    	latest := int64(0)
    
    	// Find the common cardinality from previously collected
    	// occurrences of elements.
    	for nano, count := range timeOccurrenceMap {
    		if count < maxima {
    			continue
    		}
    
    		// We are at or above maxima
    		if count > maxima || nano > latest {
    			maxima = count
    			latest = nano
    		}
    	}
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 10.8K bytes
    - Viewed (0)
  9. cmd/metrics-v2.go

    			}
    
    			if qs.QStats.Avg.Count > 0 || qs.QStats.Curr.Count > 0 {
    				qt := qs.QStats
    				currInQueueBytes.Value = qt.Curr.Bytes
    				currInQueueCount.Value = qt.Curr.Count
    				avgQueueBytes.Value = qt.Avg.Bytes
    				avgQueueCount.Value = qt.Avg.Count
    				maxQueueBytes.Value = qt.Max.Bytes
    				maxQueueCount.Value = qt.Max.Count
    			}
    			activeWorkersCount.Value = float64(qs.ActiveWorkers.Curr)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 25 22:01:31 GMT 2024
    - 132.6K bytes
    - Viewed (0)
  10. tests/count_test.go

    	if count1 != 1 || count2 != 3 {
    		t.Errorf("multiple count in chain should works")
    	}
    
    	tx := DB.Model(&User{}).Where("name = ?", user1.Name).Session(&gorm.Session{})
    	tx.Count(&count1)
    	tx.Or("name in ?", []string{user2.Name, user3.Name}).Count(&count2)
    	if count1 != 1 || count2 != 3 {
    		t.Errorf("count after new session should works")
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Oct 30 09:15:49 GMT 2023
    - 6.9K bytes
    - Viewed (0)
Back to top