Search Options

Results per page
Sort
Preferred Languages
Advance

Results 581 - 590 of 1,179 for _func (0.03 sec)

  1. cmd/http-stats.go

    }
    
    // Increase internode total input bytes
    func (s *connStats) incInternodeInputBytes(n int64) {
    	atomic.AddUint64(&s.internodeInputBytes, uint64(n))
    }
    
    // Increase internode total output bytes
    func (s *connStats) incInternodeOutputBytes(n int64) {
    	atomic.AddUint64(&s.internodeOutputBytes, uint64(n))
    }
    
    // Return internode total input bytes
    func (s *connStats) getInternodeInputBytes() uint64 {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Sep 24 17:13:00 UTC 2024
    - 11.4K bytes
    - Viewed (0)
  2. tests/transaction_test.go

    		t.Fatalf("Transaction should get error when using cancelled context")
    	}
    }
    
    func TestTransactionWithBlock(t *testing.T) {
    	assertPanic := func(f func()) {
    		defer func() {
    			if r := recover(); r == nil {
    				t.Fatalf("The code did not panic")
    			}
    		}()
    		f()
    	}
    
    	// rollback
    	err := DB.Transaction(func(tx *gorm.DB) error {
    		user := *GetUser("transaction-block", Config{})
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Sat Sep 14 12:58:29 UTC 2024
    - 12.9K bytes
    - Viewed (0)
  3. cmd/local-locker_test.go

    	}
    }
    
    func Test_localLocker_expireOldLocksExpire(t *testing.T) {
    	rng := rand.New(rand.NewSource(0))
    	quorum := 0
    	// Numbers of unique locks
    	for _, locks := range []int{100, 1000, 1e6} {
    		if testing.Short() && locks > 100 {
    			continue
    		}
    		t.Run(fmt.Sprintf("%d-locks", locks), func(t *testing.T) {
    			// Number of readers per lock...
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Jul 24 10:24:01 UTC 2024
    - 11.9K bytes
    - Viewed (0)
  4. internal/ringbuffer/ring_buffer_benchmark_test.go

    	buf := make([]byte, 512)
    
    	go func() {
    		for {
    			rb.Read(buf)
    		}
    	}()
    
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		rb.Write(data)
    	}
    }
    
    func BenchmarkRingBuffer_AsyncReadBlocking(b *testing.B) {
    	const sz = 512
    	const buffers = 10
    	rb := New(sz * buffers)
    	rb.SetBlocking(true)
    	data := []byte(strings.Repeat("a", sz))
    	buf := make([]byte, sz)
    
    	go func() {
    		for {
    			rb.Read(buf)
    		}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed May 15 00:11:04 UTC 2024
    - 1.7K bytes
    - Viewed (0)
  5. internal/s3select/sql/errors.go

    	cause      error
    }
    
    func (err *s3Error) Cause() error {
    	return err.cause
    }
    
    func (err *s3Error) ErrorCode() string {
    	return err.code
    }
    
    func (err *s3Error) ErrorMessage() string {
    	return err.message
    }
    
    func (err *s3Error) HTTPStatusCode() int {
    	return err.statusCode
    }
    
    func (err *s3Error) Error() string {
    	return err.message
    }
    
    func errInvalidDataType(err error) *s3Error {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Jun 01 21:59:40 UTC 2021
    - 2.6K bytes
    - Viewed (0)
  6. internal/config/callhome/callhome.go

    }
    
    var configLock sync.RWMutex
    
    // Enabled - indicates if callhome is enabled or not
    func (c *Config) Enabled() bool {
    	configLock.RLock()
    	defer configLock.RUnlock()
    
    	return c.Enable
    }
    
    // FrequencyDur - returns the currently configured callhome frequency
    func (c *Config) FrequencyDur() time.Duration {
    	configLock.RLock()
    	defer configLock.RUnlock()
    
    	if c.Frequency == 0 {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 2.6K bytes
    - Viewed (0)
  7. clause/locking_test.go

    package clause_test
    
    import (
    	"fmt"
    	"testing"
    
    	"gorm.io/gorm/clause"
    )
    
    func TestLocking(t *testing.T) {
    	results := []struct {
    		Clauses []clause.Interface
    		Result  string
    		Vars    []interface{}
    	}{
    		{
    			[]clause.Interface{clause.Select{}, clause.From{}, clause.Locking{Strength: clause.LockingStrengthUpdate}},
    			"SELECT * FROM `users` FOR UPDATE", nil,
    		},
    		{
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Fri Dec 15 08:32:56 UTC 2023
    - 1.2K bytes
    - Viewed (0)
  8. internal/grid/msg_string.go

    // Code generated by "stringer -type=Op -output=msg_string.go -trimprefix=Op msg.go"; DO NOT EDIT.
    
    package grid
    
    import "strconv"
    
    func _() {
    	// An "invalid array index" compiler error signifies that the constant values have changed.
    	// Re-run the stringer command to generate them again.
    	var x [1]struct{}
    	_ = x[OpConnect-1]
    	_ = x[OpConnectResponse-2]
    	_ = x[OpPing-3]
    	_ = x[OpPong-4]
    	_ = x[OpConnectMux-5]
    	_ = x[OpMuxConnectError-6]
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Nov 21 01:09:35 UTC 2023
    - 1.2K bytes
    - Viewed (0)
  9. internal/logger/target/console/console.go

    	output io.Writer
    }
    
    // Validate - validate if the tty can be written to
    func (c *Target) Validate() error {
    	return nil
    }
    
    // Endpoint returns the backend endpoint
    func (c *Target) Endpoint() string {
    	return ""
    }
    
    func (c *Target) String() string {
    	return "console"
    }
    
    // Send log message 'e' to console
    func (c *Target) Send(e interface{}) error {
    	entry, ok := e.(log.Entry)
    	if !ok {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 3.9K bytes
    - Viewed (0)
  10. internal/s3select/sql/stringfuncs.go

    		if len(parts) == 1 {
    			return "", false
    		}
    		res = parts[1]
    	}
    	return res, true
    }
    
    func dropRune(text string) (res string, ok bool) {
    	r := []rune(text)
    	if len(r) == 0 {
    		return "", false
    	}
    	return string(r[1:]), true
    }
    
    func evalSQLSubstring(s string, startIdx, length int) (res string, err error) {
    	rs := []rune(s)
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Jun 01 21:59:40 UTC 2021
    - 4.2K bytes
    - Viewed (0)
Back to top