- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 30 for testclock (0.15 sec)
-
staging/src/k8s.io/apiserver/pkg/util/flowcontrol/metrics/timing_ratio_histogram_test.go
"k8s.io/klog/v2" testclock "k8s.io/utils/clock/testing" ) const ( ddtRangeCentiPeriods = 300 ddtOffsetCentiPeriods = 50 numIterations = 100 ) var errMetricNotFound = errors.New("not found") func TestTimingRatioHistogramVecElementSimple(t *testing.T) { testHistogramName := "vec_element_simple" t0 := time.Now() clk := testclock.NewFakePassiveClock(t0) buckets := []float64{0, 1}
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Jul 13 16:03:06 UTC 2022 - 8.7K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/integrator_test.go
limitations under the License. */ package fairqueuing import ( "math" "testing" "time" testclock "k8s.io/utils/clock/testing" ) func TestIntegrator(t *testing.T) { now := time.Now() clk := testclock.NewFakeClock(now) igr := NewNamedIntegrator(clk, "testee") igr.Add(3) clk.Step(time.Second) results := igr.GetResults() rToo := igr.Reset()
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Oct 27 21:11:44 UTC 2022 - 1.6K bytes - Viewed (0) -
pkg/backoff/exponential_test.go
actualInterval := exp.NextBackOff() if !(minInterval <= actualInterval && actualInterval <= maxInterval) { t.Error("error") } } } type TestClock struct { i time.Duration start time.Time } func (c *TestClock) Now() time.Time { t := c.start.Add(c.i) c.i += time.Second return t } func TestRetry(t *testing.T) { o := DefaultOption()
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Mon Sep 05 16:03:30 UTC 2022 - 2.6K bytes - Viewed (0) -
platforms/core-runtime/base-services/src/test/groovy/org/gradle/internal/work/DefaultWorkerLeaseServiceProjectLockTest.groovy
workerLeaseService.withLocks([projectLock]) { assert testLock.tryLock() try { assert lockIsHeld(projectLock) } finally { testLock.unlock() } } } } started.await()
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Fri Apr 05 16:29:26 UTC 2024 - 25.6K bytes - Viewed (0) -
pilot/pkg/leaderelection/leaderelection_test.go
"k8s.io/client-go/kubernetes" "k8s.io/client-go/kubernetes/fake" k8stesting "k8s.io/client-go/testing" "istio.io/istio/pkg/revisions" "istio.io/istio/pkg/test/util/retry" ) const testLock = "test-lock" func createElection(t *testing.T, name string, revision string, watcher revisions.DefaultWatcher, expectLeader bool, client kubernetes.Interface, fns ...func(stop <-chan struct{}),
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Sun Apr 28 04:22:19 UTC 2024 - 11.4K bytes - Viewed (0) -
src/archive/tar/writer_test.go
} testReadFrom struct { // ReadFrom(testFile{ops}) == (wantCnt, wantErr) ops fileOps wantCnt int64 wantErr error } testClose struct { // Close() == wantErr wantErr error } testFnc any // testHeader | testWrite | testReadFrom | testClose ) vectors := []struct { file string // Optional filename of expected output tests []testFnc }{{
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 38.7K bytes - Viewed (0) -
src/image/jpeg/dct_test.go
import ( "fmt" "math" "math/rand" "strings" "testing" ) func benchmarkDCT(b *testing.B, f func(*block)) { b.StopTimer() blocks := make([]block, 0, b.N*len(testBlocks)) for i := 0; i < b.N; i++ { blocks = append(blocks, testBlocks[:]...) } b.StartTimer() for i := range blocks { f(&blocks[i]) } } func BenchmarkFDCT(b *testing.B) { benchmarkDCT(b, fdct) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Sep 06 15:49:30 UTC 2022 - 8.6K bytes - Viewed (0) -
platforms/core-execution/persistent-cache/src/integTest/groovy/org/gradle/cache/internal/DefaultFileLockManagerContentionIntegrationTest.groovy
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Tue Jun 11 09:51:15 UTC 2024 - 15.1K bytes - Viewed (0) -
pkg/kubelet/cm/cpumanager/state/state_test.go
See the License for the specific language governing permissions and limitations under the License. */ package state import ( "reflect" "testing" "k8s.io/utils/cpuset" ) func TestClone(t *testing.T) { expect := ContainerCPUAssignments{ "pod": map[string]cpuset.CPUSet{ "container1": cpuset.New(4, 5, 6), "container2": cpuset.New(1, 2, 3), }, } actual := expect.Clone()
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed May 03 16:26:09 UTC 2023 - 935 bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/server/egressselector/metrics/metrics.go
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Nov 01 23:36:51 UTC 2022 - 4.3K bytes - Viewed (0)