Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 131 for sum2 (0.11 sec)

  1. pkg/kubelet/checkpointmanager/checksum/checksum.go

    	return Checksum(getChecksum(data))
    }
    
    // Get returns calculated checksum of checkpoint data
    func getChecksum(data interface{}) uint64 {
    	hash := fnv.New32a()
    	hashutil.DeepHashObject(hash, data)
    	return uint64(hash.Sum32())
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 25 01:56:43 UTC 2019
    - 1.3K bytes
    - Viewed (0)
  2. pkg/controller/deployment/util/hash_test.go

    	}
    }
    
    func getPodTemplateSpecOldHash(template v1.PodTemplateSpec) uint32 {
    	podTemplateSpecHasher := adler32.New()
    	hashutil.DeepHashObject(podTemplateSpecHasher, template)
    	return podTemplateSpecHasher.Sum32()
    }
    
    func BenchmarkFnv(b *testing.B) {
    	spec := v1.PodTemplateSpec{}
    	json.Unmarshal([]byte(podSpec), &spec)
    
    	for i := 0; i < b.N; i++ {
    		controller.ComputeHash(&spec, nil)
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jan 28 19:00:40 UTC 2019
    - 4K bytes
    - Viewed (0)
  3. src/testing/helper_test.go

        helperfuncs_test.go:56: 4
        --- FAIL: TestTBHelper/sub \([^)]+\)
            helperfuncs_test.go:59: 5
            helperfuncs_test.go:24: 6
            helperfuncs_test.go:58: 7
        --- FAIL: TestTBHelper/sub2 \([^)]+\)
            helperfuncs_test.go:80: 11
        helperfuncs_test.go:84: recover 12
        helperfuncs_test.go:86: GenericFloat64
        helperfuncs_test.go:87: GenericInt
        helper_test.go:22: 8
        helperfuncs_test.go:73: 9
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 21 17:24:47 UTC 2023
    - 2.6K bytes
    - Viewed (0)
  4. pkg/kubelet/cm/dra/state/checkpoint.go

    	object = strings.Replace(object, "ClaimInfoStateListWithoutResourceHandles", "ClaimInfoStateList", 1)
    	hash := fnv.New32a()
    	fmt.Fprintf(hash, "%v", object)
    	if checkSum != checksum.Checksum(hash.Sum32()) {
    		return errors.ErrCorruptCheckpoint
    	}
    	return nil
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jul 18 15:23:10 UTC 2023
    - 4.1K bytes
    - Viewed (0)
  5. src/hash/crc32/crc32.go

    	// initialization in this case.
    	d.crc = update(d.crc, d.tab, p, false)
    	return len(p), nil
    }
    
    func (d *digest) Sum32() uint32 { return d.crc }
    
    func (d *digest) Sum(in []byte) []byte {
    	s := d.Sum32()
    	return append(in, byte(s>>24), byte(s>>16), byte(s>>8), byte(s))
    }
    
    // Checksum returns the CRC-32 checksum of data
    // using the polynomial represented by the [Table].
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun May 12 05:36:29 UTC 2024
    - 7.5K bytes
    - Viewed (0)
  6. platforms/core-runtime/base-services/src/test/groovy/org/gradle/util/PathTest.groovy

            path = Path.path(':sub')
    
            then:
            path.relativePath(':') == ':'
            path.relativePath(':sub') == ':sub'
            path.relativePath(':sub:path') == 'path'
            path.relativePath(':sub2:path') == ':sub2:path'
            path.relativePath(':other:path') == ':other:path'
        }
    
        def 'converts relative path to relative path'() {
            def path = path(':')
    
            expect:
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Oct 02 12:54:37 UTC 2023
    - 8.9K bytes
    - Viewed (0)
  7. src/hash/adler32/adler32.go

    // license that can be found in the LICENSE file.
    
    // Package adler32 implements the Adler-32 checksum.
    //
    // It is defined in RFC 1950:
    //
    //	Adler-32 is composed of two sums accumulated per byte: s1 is
    //	the sum of all bytes, s2 is the sum of all s1 values. Both sums
    //	are done modulo 65521. s1 is initialized to 1, s2 to zero.  The
    //	Adler-32 checksum is stored as s2*65536 + s1 in most-
    //	significant-byte first (network) order.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun May 12 05:36:29 UTC 2024
    - 3K bytes
    - Viewed (0)
  8. src/testing/helperfuncs_test.go

    		wg.Add(1)
    		go func() {
    			notHelperCallingHelper(t, "parallel")
    			wg.Done()
    		}()
    	}
    	wg.Wait()
    }
    
    func helperSubCallingHelper(t *testing.T, msg string) {
    	t.Helper()
    	t.Run("sub2", func(t *testing.T) {
    		t.Helper()
    		t.Fatal(msg)
    	})
    }
    
    func recoverHelper(t *testing.T, msg string) {
    	t.Helper()
    	defer func() {
    		t.Helper()
    		if err := recover(); err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 21 17:24:47 UTC 2023
    - 2.4K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apiserver/pkg/util/flowcontrol/conc_alloc.go

    	}
    	if lowSum-requiredSumF > epsilon {
    		return nil, 0, fmt.Errorf("lower bounds sum to %v, which is higher than the required sum of %v", lowSum, requiredSum)
    	}
    	if requiredSumF-highSum > epsilon {
    		return nil, 0, fmt.Errorf("upper bounds sum to %v, which is lower than the required sum of %v", highSum, requiredSum)
    	}
    	ans := make([]float64, len(classes))
    	if requiredSum == 0 {
    		return ans, 0, nil
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sun Dec 18 04:27:38 UTC 2022
    - 9.5K bytes
    - Viewed (0)
  10. pkg/kubelet/cm/cpumanager/state/checkpoint.go

    	object = strings.Replace(object, "CPUManagerCheckpointV1", "CPUManagerCheckpoint", 1)
    	cp.Checksum = ck
    
    	hash := fnv.New32a()
    	fmt.Fprintf(hash, "%v", object)
    	if cp.Checksum != checksum.Checksum(hash.Sum32()) {
    		return errors.ErrCorruptCheckpoint
    	}
    
    	return nil
    }
    
    // VerifyChecksum verifies that current checksum of checkpoint is valid in v2 format
    func (cp *CPUManagerCheckpointV2) VerifyChecksum() error {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Mar 27 01:24:22 UTC 2023
    - 4.3K bytes
    - Viewed (0)
Back to top