Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 302 for math (0.15 sec)

  1. internal/s3select/sql/value.go

    				result = intA
    			}
    		}
    		v.setInt(result)
    		return nil
    	}
    
    	floatV, _ := v.ToFloat()
    	floatA, _ := a.ToFloat()
    	var result float64
    	if !isMax {
    		result = math.Min(floatV, floatA)
    	} else {
    		result = math.Max(floatV, floatA)
    	}
    	v.setFloat(result)
    	return nil
    }
    
    func inferTypeAsTimestamp(v *Value) error {
    	if s, ok := v.ToString(); ok {
    		t, err := parseSQLTimestamp(s)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Feb 25 20:31:19 GMT 2022
    - 20.2K bytes
    - Viewed (0)
  2. internal/dsync/utils.go

    //
    // You should have received a copy of the GNU Affero General Public License
    // along with this program.  If not, see <http://www.gnu.org/licenses/>.
    
    package dsync
    
    import (
    	"math/rand"
    	"time"
    )
    
    func backoffWait(min, unit, cap time.Duration) func(*rand.Rand, uint) time.Duration {
    	if unit > time.Hour {
    		// Protect against integer overflow
    		panic("unit cannot exceed one hour")
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sat May 13 15:42:21 GMT 2023
    - 1.2K bytes
    - Viewed (0)
  3. internal/dsync/locked_rand.go

    //
    // You should have received a copy of the GNU Affero General Public License
    // along with this program.  If not, see <http://www.gnu.org/licenses/>.
    
    package dsync
    
    import (
    	"math/rand"
    	"sync"
    )
    
    // lockedRandSource provides protected rand source, implements rand.Source interface.
    type lockedRandSource struct {
    	lk  sync.Mutex
    	src rand.Source
    }
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Oct 18 15:39:59 GMT 2021
    - 1.3K bytes
    - Viewed (0)
  4. cmd/license-update.go

    //
    // You should have received a copy of the GNU Affero General Public License
    // along with this program.  If not, see <http://www.gnu.org/licenses/>.
    
    package cmd
    
    import (
    	"context"
    	"fmt"
    	"math/rand"
    	"time"
    
    	"github.com/tidwall/gjson"
    )
    
    const (
    	licUpdateCycle = 24 * time.Hour * 30
    	licRenewPath   = "/api/cluster/renew-license"
    )
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 3.3K bytes
    - Viewed (0)
  5. internal/grid/types.go

    // MarshalMsg implements msgp.Marshaler
    func (j *Array[T]) MarshalMsg(b []byte) (o []byte, err error) {
    	if j.val == nil {
    		return msgp.AppendNil(b), nil
    	}
    	if uint64(len(j.val)) > math.MaxUint32 {
    		return b, errors.New("array: length of array exceeds math.MaxUint32")
    	}
    	b = msgp.AppendArrayHeader(b, uint32(len(j.val)))
    	for _, v := range j.val {
    		b, err = v.MarshalMsg(b)
    		if err != nil {
    			return b, err
    		}
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Apr 01 23:42:09 GMT 2024
    - 15.4K bytes
    - Viewed (0)
  6. cmd/erasure-common.go

    //
    // You should have received a copy of the GNU Affero General Public License
    // along with this program.  If not, see <http://www.gnu.org/licenses/>.
    
    package cmd
    
    import (
    	"context"
    	"fmt"
    	"io"
    	"math/rand"
    	"sync"
    	"time"
    
    	"github.com/minio/pkg/v2/sync/errgroup"
    )
    
    func (er erasureObjects) getOnlineDisks() (newDisks []StorageAPI) {
    	disks := er.getDisks()
    	var wg sync.WaitGroup
    	var mu sync.Mutex
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 4.6K bytes
    - Viewed (0)
  7. internal/s3select/sql/value_test.go

    			wantOK: true,
    		},
    		{
    			name: "max",
    			fields: fields{
    				value: []byte(strconv.FormatInt(math.MaxInt64, 10)),
    			},
    			want:   math.MaxInt64,
    			wantOK: true,
    		},
    		{
    			name: "min",
    			fields: fields{
    				value: []byte(strconv.FormatInt(math.MinInt64, 10)),
    			},
    			want:   math.MinInt64,
    			wantOK: true,
    		},
    		{
    			name: "max-overflow",
    			fields: fields{
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Mar 06 16:56:10 GMT 2023
    - 12.5K bytes
    - Viewed (0)
  8. cmd/metrics-v3-system-cpu.go

    		m.Set(sysCPULoadPerc, math.Round(perc*100)/100)
    	}
    
    	ts := cpuMetrics.TimesStat
    	tot := ts.User + ts.System + ts.Idle + ts.Iowait + ts.Nice + ts.Steal
    	cpuUserVal := math.Round(ts.User/tot*100*100) / 100
    	m.Set(sysCPUUser, cpuUserVal)
    	cpuSystemVal := math.Round(ts.System/tot*100*100) / 100
    	m.Set(sysCPUSystem, cpuSystemVal)
    	cpuNiceVal := math.Round(ts.Nice/tot*100*100) / 100
    	m.Set(sysCPUNice, cpuNiceVal)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Apr 23 23:56:12 GMT 2024
    - 3K bytes
    - Viewed (0)
  9. cmd/erasure-server-pool-rebalance.go

    	var errStr string
    	if err != nil {
    		errStr = err.Error()
    	}
    	return madmin.TraceInfo{
    		TraceType: madmin.TraceRebalance,
    		Time:      startTime,
    		NodeName:  globalLocalNodeName,
    		FuncName:  fmt.Sprintf("rebalance.%s (pool-id=%d)", r.String(), poolIdx),
    		Duration:  duration,
    		Path:      path,
    		Error:     errStr,
    	}
    }
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Apr 26 19:29:28 GMT 2024
    - 27.2K bytes
    - Viewed (0)
  10. cmd/metrics-resource.go

    					tot := ts.User + ts.System + ts.Idle + ts.Iowait + ts.Nice + ts.Steal
    					cpuUserVal := math.Round(ts.User/tot*100*100) / 100
    					updateResourceMetrics(cpuSubsystem, cpuUser, cpuUserVal, labels, false)
    					cpuSystemVal := math.Round(ts.System/tot*100*100) / 100
    					updateResourceMetrics(cpuSubsystem, cpuSystem, cpuSystemVal, labels, false)
    					cpuIdleVal := math.Round(ts.Idle/tot*100*100) / 100
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Apr 23 23:56:12 GMT 2024
    - 17.4K bytes
    - Viewed (0)
Back to top