Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for dur (0.13 sec)

  1. internal/config/identity/tls/config.go

    	if dsecs == "" {
    		return defaultExpiry, nil
    	}
    
    	d, err := strconv.Atoi(dsecs)
    	if err != nil {
    		return 0, auth.ErrInvalidDuration
    	}
    
    	dur := time.Duration(d) * time.Second
    
    	if dur < minExpiry || dur > maxExpiry {
    		return 0, auth.ErrInvalidDuration
    	}
    	return dur, nil
    }
    
    // Lookup returns a new Config by merging the given K/V config
    // system with environment variables.
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Sep 04 19:57:37 GMT 2023
    - 3.6K bytes
    - Viewed (0)
  2. cmd/dynamic-timeouts.go

    // previous results
    func (dt *dynamicTimeout) adjust(entries [dynamicTimeoutLogSize]time.Duration) {
    	failures, max := 0, time.Duration(0)
    	for _, dur := range entries[:] {
    		if dur == maxDuration {
    			failures++
    		} else if dur > max {
    			max = dur
    		}
    	}
    
    	failPct := float64(failures) / float64(len(entries))
    
    	if failPct > dynamicTimeoutIncreaseThresholdPct {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Aug 19 23:21:05 GMT 2022
    - 4.5K bytes
    - Viewed (0)
  3. internal/config/drive/drive.go

    	if d == "" {
    		d = env.Get("_MINIO_DRIVE_MAX_TIMEOUT", "")
    		if d == "" {
    			d = env.Get("_MINIO_DISK_MAX_TIMEOUT", "")
    		}
    	}
    
    	dur, _ := time.ParseDuration(d)
    	if dur < time.Second {
    		cfg.MaxTimeout = 30 * time.Second
    	} else {
    		cfg.MaxTimeout = getMaxTimeout(dur)
    	}
    	return cfg, err
    }
    
    func getMaxTimeout(t time.Duration) time.Duration {
    	if t < time.Second {
    		// get default value
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 11 01:10:30 GMT 2024
    - 2.5K bytes
    - Viewed (0)
  4. cmd/last-minute.go

    type AccElem struct {
    	Total int64
    	Size  int64
    	N     int64
    }
    
    // Add a duration to a single element.
    func (a *AccElem) add(dur time.Duration) {
    	if dur < 0 {
    		dur = 0
    	}
    	a.Total += int64(dur)
    	a.N++
    }
    
    // Merge b into a.
    func (a *AccElem) merge(b AccElem) {
    	a.N += b.N
    	a.Total += b.Total
    	a.Size += b.Size
    }
    
    // Avg returns average time spent.
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Wed Jul 05 17:40:45 GMT 2023
    - 4.8K bytes
    - Viewed (0)
  5. cmd/metrics.go

    func healingMetricsPrometheus(ch chan<- prometheus.Metric) {
    	bgSeq, exists := globalBackgroundHealState.getHealSequenceByToken(bgHealingUUID)
    	if !exists {
    		return
    	}
    
    	var dur time.Duration
    	if !bgSeq.lastHealActivity.IsZero() {
    		dur = time.Since(bgSeq.lastHealActivity)
    	}
    
    	ch <- prometheus.MustNewConstMetric(
    		prometheus.NewDesc(
    			prometheus.BuildFQName(healMetricsNamespace, "time", "since_last_activity"),
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Apr 02 06:48:36 GMT 2024
    - 16.9K bytes
    - Viewed (0)
  6. internal/config/identity/ldap/ldap.go

    		return l.stsExpiryDuration, nil
    	}
    
    	d, err := strconv.Atoi(dsecs)
    	if err != nil {
    		return 0, auth.ErrInvalidDuration
    	}
    
    	dur := time.Duration(d) * time.Second
    
    	if dur < minLDAPExpiry || dur > maxLDAPExpiry {
    		return 0, auth.ErrInvalidDuration
    	}
    	return dur, nil
    }
    
    // ParsesAsDN determines if the given string could be a valid DN based on
    // parsing alone.
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 25 15:50:16 GMT 2024
    - 9.9K bytes
    - Viewed (0)
  7. cmd/tier.go

    		Buckets: []float64{0.01, 0.1, 1, 2, 5, 10, 60, 5 * 60, 15 * 60, 30 * 60},
    	}, []string{"tier"}),
    }
    
    func (t *tierMetrics) Observe(tier string, dur time.Duration) {
    	t.histogram.With(prometheus.Labels{"tier": tier}).Observe(dur.Seconds())
    }
    
    func (t *tierMetrics) logSuccess(tier string) {
    	t.Lock()
    	defer t.Unlock()
    
    	stat := t.requestsCount[tier]
    	stat.success++
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Wed Apr 17 05:09:58 GMT 2024
    - 15.5K bytes
    - Viewed (0)
  8. cmd/server-main.go

    	}
    
    	now := time.Now()
    	worker()
    	dur := time.Since(now)
    
    	info := madmin.TraceInfo{
    		TraceType: madmin.TraceBootstrap,
    		Time:      UTCNow(),
    		NodeName:  globalLocalNodeName,
    		FuncName:  "BOOTSTRAP",
    		Message:   fmt.Sprintf("%s %s (duration: %s)", getSource(2), msg, dur),
    	}
    	globalBootstrapTracer.Record(info)
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Wed Apr 24 04:08:47 GMT 2024
    - 33K bytes
    - Viewed (1)
  9. cmd/bucket-stats.go

    	rl.LastMinute.addAll(t-1, AccElem{Total: t - 1, Size: n, N: 1})
    }
    
    func (rl *ReplicationLastMinute) String() string {
    	t := rl.LastMinute.getTotal()
    	return fmt.Sprintf("ReplicationLastMinute sz= %d, n=%d , dur=%d", t.Size, t.N, t.Total)
    }
    
    func (rl *ReplicationLastMinute) getTotal() AccElem {
    	return rl.LastMinute.getTotal()
    }
    
    // ReplicationLastHour keeps track of replication counts over the last hour
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Feb 06 06:00:45 GMT 2024
    - 13.1K bytes
    - Viewed (0)
Back to top