Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 445 for float64 (0.25 sec)

  1. cmd/metrics-v3-system-cpu.go

    	cpuMetrics, _ := c.cpuMetrics.Get()
    
    	if cpuMetrics.LoadStat != nil {
    		m.Set(sysCPULoad, cpuMetrics.LoadStat.Load1)
    		perc := cpuMetrics.LoadStat.Load1 * 100 / float64(cpuMetrics.CPUCount)
    		m.Set(sysCPULoadPerc, math.Round(perc*100)/100)
    	}
    
    	ts := cpuMetrics.TimesStat
    	tot := ts.User + ts.System + ts.Idle + ts.Iowait + ts.Nice + ts.Steal
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Apr 23 23:56:12 GMT 2024
    - 3K bytes
    - Viewed (0)
  2. cni/pkg/repair/repair_test.go

    	}
    	return
    }
    
    func TestLabelPods(t *testing.T) {
    	tests := []struct {
    		name       string
    		client     kube.Client
    		config     config.RepairConfig
    		wantLabels map[string]string
    		wantCount  float64
    		wantTags   map[string]string
    	}{
    		{
    			name:   "No broken pods",
    			client: fakeClient(workingPod, workingPodDiedPreviously),
    			config: config.RepairConfig{
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Tue Oct 24 03:31:28 GMT 2023
    - 10.6K bytes
    - Viewed (0)
  3. cmd/erasure.go

    	// This goroutine owns the cache.
    	var saverWg sync.WaitGroup
    	saverWg.Add(1)
    	go func() {
    		// Add jitter to the update time so multiple sets don't sync up.
    		updateTime := 30*time.Second + time.Duration(float64(10*time.Second)*rand.Float64())
    		t := time.NewTicker(updateTime)
    		defer t.Stop()
    		defer saverWg.Done()
    		var lastSave time.Time
    
    		for {
    			select {
    			case <-t.C:
    				if cache.Info.LastUpdate.Equal(lastSave) {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Apr 26 06:32:14 GMT 2024
    - 16K bytes
    - Viewed (1)
  4. internal/dsync/drwmutex.go

    	tolerance := len(restClnts) / 2
    
    	isReadLock := false
    	for !releaseAll(ctx, dm.clnt, tolerance, owner, &locks, isReadLock, restClnts, dm.Names...) {
    		time.Sleep(time.Duration(dm.rng.Float64() * float64(dm.lockRetryMinInterval)))
    	}
    }
    
    // RUnlock releases a read lock held on dm.
    //
    // It is a run-time error if dm is not locked on entry to RUnlock.
    func (dm *DRWMutex) RUnlock(ctx context.Context) {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 19.7K bytes
    - Viewed (0)
  5. cmd/tier_test.go

    	for i := 0; i < expSuccess; i++ {
    		globalTierMetrics.logSuccess(tier)
    	}
    	for i := 0; i < expFailure; i++ {
    		globalTierMetrics.logFailure(tier)
    	}
    	metrics := globalTierMetrics.Report()
    	var succ, fail float64
    	for _, metric := range metrics {
    		switch metric.Description.Name {
    		case tierRequestsSuccess:
    			succ += metric.Value
    		case tierRequestsFailure:
    			fail += metric.Value
    		}
    	}
    	if int(succ) != expSuccess {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Dec 21 04:13:40 GMT 2023
    - 1.5K bytes
    - Viewed (0)
  6. internal/s3select/sql/parser.go

    	Timestamp2 *PrimaryTerm `parser:" @@ \")\" "`
    }
    
    // LitValue represents a literal value parsed from the sql
    type LitValue struct {
    	Float   *float64       `parser:"(  @Float"`
    	Int     *float64       `parser:" | @Int"` // To avoid value out of range, use float64 instead
    	String  *LiteralString `parser:" | @LitString"`
    	Boolean *Boolean       `parser:" | @(\"TRUE\" | \"FALSE\")"`
    	Null    bool           `parser:" | @\"NULL\""`
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 12.9K bytes
    - Viewed (0)
  7. cmd/site-replication-utils.go

    	// Run the site resync metrics load in a loop
    	for {
    		if err := sm.load(ctx, newObjectLayerFn()); err == nil {
    			<-ctx.Done()
    			return
    		}
    		duration := time.Duration(r.Float64() * float64(time.Second*10))
    		if duration < time.Second {
    			// Make sure to sleep at least a second to avoid high CPU ticks.
    			duration = time.Second
    		}
    		time.Sleep(duration)
    	}
    }
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 8.9K bytes
    - Viewed (1)
  8. internal/s3select/sql/evaluate.go

    	switch rval := result.(type) {
    	case string:
    		return FromString(rval), nil
    	case float64:
    		return FromFloat(rval), nil
    	case int64:
    		return FromInt(rval), nil
    	case uint64:
    		if rval <= math.MaxInt64 {
    			return FromInt(int64(rval)), nil
    		}
    		return FromFloat(float64(rval)), nil
    	case bool:
    		return FromBool(rval), nil
    	case jstream.KVS:
    		bs, err := json.Marshal(result)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sat Dec 23 07:19:11 GMT 2023
    - 12K bytes
    - Viewed (0)
  9. cmd/perf-tests.go

    		}(index)
    	}
    
    	time.Sleep(duration)
    	xioutil.SafeClose(r.eof)
    	wg.Wait()
    	for {
    		if globalNetPerfRX.ActiveConnections() == 0 {
    			break
    		}
    		time.Sleep(time.Second)
    	}
    	rx := float64(globalNetPerfRX.RXSample)
    	delta := globalNetPerfRX.firstToDisconnect.Sub(globalNetPerfRX.lastToConnect)
    	if delta < 0 {
    		rx = 0
    		errStr = "network disconnection issues detected"
    	}
    
    	globalNetPerfRX.Reset()
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Jan 28 18:04:17 GMT 2024
    - 11.3K bytes
    - Viewed (0)
  10. cmd/batch-rotate.go

    				batchLogIf(ctx, ri.updateAfter(ctx, api, 10*time.Second, job))
    				if success {
    					break
    				}
    				if delay > 0 {
    					time.Sleep(delay + time.Duration(rnd.Float64()*float64(delay)))
    				}
    			}
    
    			if wait := globalBatchConfig.KeyRotationWait(); wait > 0 {
    				time.Sleep(wait)
    			}
    		}()
    	}
    	wk.Wait()
    
    	ri.Complete = ri.ObjectsFailed == 0
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 14.2K bytes
    - Viewed (0)
Back to top