- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 335 for sortby (0.24 sec)
-
src/cmd/vendor/github.com/google/pprof/internal/driver/html/top.html
for (let i = 0; i < entries.length; i++) { entries[i].Id = 'node' + i; } // Which column are we currently sorted by and in what order? let currentColumn = ''; let descending = false; sortBy('Flat'); function sortBy(column) { // Update sort criteria if (column == currentColumn) { descending = !descending; // Reverse order } else {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 17 14:39:18 UTC 2022 - 3.1K bytes - Viewed (0) -
istioctl/pkg/util/handlers/handlers.go
} // We need to pass in a sorter, and the one used by `kubectl logs` is good enough. sortBy := func(pods []*corev1.Pod) sort.Interface { return podutils.ByLogging(pods) } timeout := 2 * time.Second if getFirstPodFunc == nil { getFirstPodFunc = polymorphichelpers.GetFirstPod } pod, _, err := getFirstPodFunc(client, namespace, selector, timeout, sortBy) if err != nil {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue Feb 06 15:01:41 UTC 2024 - 6.2K bytes - Viewed (0) -
pkg/kube/krt/join_test.go
c1.Set(&Named{"c1", "b"}) assert.EventuallyEqual(t, last.Load, "c1/b") // ordered by c1, c2, c3 sortf := func(a Named) string { return a.ResourceName() } assert.Equal( t, slices.SortBy(j.List(), sortf), slices.SortBy([]Named{ {"c1", "b"}, {"c2", "a"}, {"c3", "a"}, }, sortf), ) } func TestCollectionJoin(t *testing.T) { c := kube.NewFakeClient()
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue Apr 09 19:55:53 UTC 2024 - 6.1K bytes - Viewed (0) -
pkg/kube/krt/index_test.go
pods := krt.Fetch(ctx, SimplePods, krt.FilterIndex(IPIndex, "1.2.3.5")) names := slices.Sort(slices.Map(pods, SimplePod.ResourceName)) return ptr.Of(strings.Join(names, ",")) }) Collection.AsCollection().Synced().WaitUntilSynced(stop) fetchSorted := func(ip string) []SimplePod { return slices.SortBy(IPIndex.Lookup(ip), func(t SimplePod) string { return t.ResourceName() }) }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue Apr 09 19:55:53 UTC 2024 - 4.5K bytes - Viewed (0) -
staging/src/k8s.io/cli-runtime/pkg/printers/interface.go
type PrintOptions struct { NoHeaders bool WithNamespace bool WithKind bool Wide bool ShowLabels bool Kind schema.GroupKind ColumnLabels []string SortBy string // indicates if it is OK to ignore missing keys for rendering an output template. AllowMissingKeys bool
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Mar 30 00:36:07 UTC 2022 - 1.5K bytes - Viewed (0) -
pkg/kube/krt/informer_test.go
cmt.Update(cmA2) tt.WaitOrdered("update/ns/a") assert.Equal(t, ConfigMaps.List(), []*corev1.ConfigMap{cmA2}) cmt.Create(cmB) tt.WaitOrdered("add/ns/b") assert.Equal(t, slices.SortBy(ConfigMaps.List(), func(a *corev1.ConfigMap) string { return a.Name }), []*corev1.ConfigMap{cmA2, cmB}) assert.Equal(t, ConfigMaps.GetKey("ns/b"), &cmB) assert.Equal(t, ConfigMaps.GetKey("ns/a"), &cmA2)
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Wed Apr 17 16:38:40 UTC 2024 - 3.3K bytes - Viewed (0) -
pkg/slices/slices.go
if len(x) <= 1 { return x } slices.SortStableFunc(x, less) return x } // SortBy is a helper to sort a slice by some value. Typically, this would be sorting a struct // by a single field. If you need to have multiple fields, see the ExampleSort. func SortBy[E any, A constraints.Ordered](x []E, extract func(a E) A) []E { if len(x) <= 1 { return x } SortFunc(x, func(a, b E) int {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Wed May 15 06:28:11 UTC 2024 - 7.9K bytes - Viewed (0) -
analysis/analysis-api-impl-base/tests/org/jetbrains/kotlin/analysis/api/impl/base/test/cases/components/scopeProvider/TestScopeRenderer.kt
withIndent { appendLine(it) } } } } } scope.getPackageSymbols() .toMutableList() .apply { sortBy { it.fqName.asString() } } .renderAll("packages") { prettyRenderPackage(it) } scope.getClassifierSymbols().toList().renderAll("classifiers") { prettyRenderDeclaration(it) }
Registered: Wed Jun 12 09:53:16 UTC 2024 - Last Modified: Tue Jun 04 08:26:19 UTC 2024 - 7.3K bytes - Viewed (0) -
istioctl/pkg/util/handlers/handlers_test.go
return nil, fmt.Errorf("unexpected request") } }), } getFirstPodFunc = func(client corev1client.PodsGetter, namespace string, selector string, timeout time.Duration, sortBy func([]*corev1.Pod) sort.Interface) ( *corev1.Pod, int, error, ) { return attachPod(namespace), 1, nil } for _, tt := range tests { t.Run(strings.Split(tt.name, ".")[0], func(t *testing.T) {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Fri Jun 09 18:17:49 UTC 2023 - 6.6K bytes - Viewed (0) -
pkg/monitoring/monitoring.go
} // ExportMetricDefinitions reports all currently registered metric definitions. func ExportMetricDefinitions() []MetricDefinition { knownMetrics.mu.Lock() defer knownMetrics.mu.Unlock() return slices.SortBy(maps.Values(knownMetrics.known), func(a MetricDefinition) string { return a.Name }) } // register records a newly defined metric. Only valid before an exporter is set.
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue Oct 24 03:31:28 UTC 2023 - 9.5K bytes - Viewed (0)