Search Options

Results per page
Sort
Preferred Languages
Advance

Results 121 - 130 of 175 for newTimer (0.43 sec)

  1. pkg/registry/authentication/selfsubjectreview/rest.go

    		return nil, apierrors.NewBadRequest("no user present on request")
    	}
    
    	extra := user.GetExtra()
    
    	selfSR := &authenticationapi.SelfSubjectReview{
    		ObjectMeta: metav1.ObjectMeta{
    			CreationTimestamp: metav1.NewTime(time.Now()),
    		},
    		Status: authenticationapi.SelfSubjectReviewStatus{
    			UserInfo: authenticationapi.UserInfo{
    				Username: user.GetName(),
    				UID:      user.GetUID(),
    				Groups:   user.GetGroups(),
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Mar 08 23:42:33 UTC 2023
    - 2.8K bytes
    - Viewed (0)
  2. pkg/kubelet/stats/cadvisor_stats_provider.go

    		if containerName == kubetypes.PodInfraContainerName {
    			// Special case for infrastructure container which is hidden from
    			// the user and has network stats.
    			podStats.StartTime = metav1.NewTime(cinfo.Spec.CreationTime)
    		} else {
    			podStats.Containers = append(podStats.Containers, *cadvisorInfoToContainerCPUAndMemoryStats(containerName, &cinfo))
    		}
    	}
    
    	// Add each PodStats to the result.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Nov 16 13:34:22 UTC 2023
    - 18.9K bytes
    - Viewed (0)
  3. pkg/registry/core/persistentvolume/strategy_test.go

    		PersistentVolumeToSelectableFields(&api.PersistentVolume{}),
    		map[string]string{"name": "metadata.name"},
    	)
    }
    
    func TestStatusUpdate(t *testing.T) {
    	now := metav1.Now()
    	origin := metav1.NewTime(now.Add(time.Hour))
    	later := metav1.NewTime(now.Add(time.Hour * 2))
    	NowFunc = func() metav1.Time { return now }
    	defer func() {
    		NowFunc = metav1.Now
    	}()
    	tests := []struct {
    		name        string
    		fg          bool
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 11K bytes
    - Viewed (0)
  4. pkg/kubelet/stats/cri_stats_provider_test.go

    		workingSetBytes := uint64(seed + offsetCRI + offsetMemWorkingSetBytes)
    		podStats.CPU = &statsapi.CPUStats{
    			Time:                 metav1.NewTime(timestamp),
    			UsageCoreNanoSeconds: &usageCoreNanoSeconds,
    		}
    		podStats.Memory = &statsapi.MemoryStats{
    			Time:            metav1.NewTime(timestamp),
    			WorkingSetBytes: &workingSetBytes,
    		}
    	}
    
    	return podStats
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 25 14:24:16 UTC 2024
    - 54.5K bytes
    - Viewed (0)
  5. okhttp-testing-support/src/main/kotlin/okhttp3/internal/concurrent/TaskFaker.kt

      }
    
      /** Advance the simulated clock, then runs tasks that are ready. Used by the test thread only. */
      fun advanceUntil(newTime: Long) {
        taskRunner.assertThreadDoesntHoldLock()
    
        taskRunner.lock.withLock {
          check(currentTask == TestThreadSerialTask)
          nanoTime = newTime
          yieldUntil(ResumePriority.AfterOtherTasks)
        }
      }
    
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Mon Apr 29 00:33:04 UTC 2024
    - 12.6K bytes
    - Viewed (0)
  6. platforms/core-runtime/files/src/test/groovy/org/gradle/internal/file/impl/DefaultDeleterTest.groovy

        }
    
        class FileTime {
    
            static long oldTime = 1000
            static long startTime = oldTime + 2000
            static long newTime = startTime + 2000
    
            static DefaultDeleter deleterWithDeletionAction(Function<File, DeletionAction> deletionAction) {
                new DefaultDeleter(
                    { startTime },
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Feb 09 12:40:48 UTC 2024
    - 14.2K bytes
    - Viewed (0)
  7. pkg/kubelet/server/stats/summary_windows_test.go

    	containerStats := getContainerStats()
    	podStats := statsapi.PodStats{
    		PodRef:     statsapi.PodReference{Name: "test-pod", Namespace: "test-namespace", UID: "UID_test-pod"},
    		StartTime:  metav1.NewTime(time.Now()),
    		Containers: []statsapi.ContainerStats{*containerStats},
    		CPU:        containerStats.CPU,
    		Memory:     containerStats.Memory,
    	}
    
    	return &podStats
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Mar 07 08:12:16 UTC 2024
    - 4.4K bytes
    - Viewed (0)
  8. src/net/http/transport_test.go

    		}))
    
    		cst.c.Timeout = timeout
    
    		_, err := cst.c.Get(cst.ts.URL)
    		if err == nil {
    			close(cancelHandler)
    			t.Fatal("unexpected Get success")
    		}
    
    		tooSlow := time.NewTimer(timeout * 10)
    		select {
    		case <-tooSlow.C:
    			// If we didn't get into the Handler, that probably means the builder was
    			// just slow and the Get failed in that time but never made it to the
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jun 06 21:59:21 UTC 2024
    - 192.6K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/micro_time_test.go

    				t.Errorf("Failed equality test for '%v', '%v': expected %+v, got %+v", c.x, c.y, c.result, result)
    			}
    		})
    	}
    }
    
    func TestMicroTimeEqualTime(t *testing.T) {
    	t1 := NewMicroTime(time.Now())
    	t2 := NewTime(t1.Time)
    	cases := []struct {
    		name   string
    		x      *MicroTime
    		y      *Time
    		result bool
    	}{
    		{"nil =? nil", nil, nil, true},
    		{"!nil =? !nil", &t1, &t2, true},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 21:48:10 UTC 2024
    - 11.1K bytes
    - Viewed (0)
  10. pkg/kubelet/util/pod_startup_latency_tracker_test.go

    		{State: corev1.ContainerState{Running: &corev1.ContainerStateRunning{StartedAt: metav1.NewTime(frozenTime)}}},
    	})
    }
    
    func buildPodWithStatus(cs []corev1.ContainerStatus) *corev1.Pod {
    	return &corev1.Pod{
    		ObjectMeta: metav1.ObjectMeta{
    			UID:               types.UID(uid),
    			CreationTimestamp: metav1.NewTime(frozenTime),
    		},
    		Status: corev1.PodStatus{
    			ContainerStatuses: cs,
    		},
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Nov 15 06:09:49 UTC 2023
    - 13.7K bytes
    - Viewed (0)
Back to top