Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 721 for sortby (0.2 sec)

  1. 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)
  2. src/cmd/trace/goroutines.go

    		}
    
    		// Sort.
    		sortBy := r.FormValue("sortby")
    		if _, ok := validNonOverlappingStats[sortBy]; ok {
    			slices.SortFunc(goroutines, func(a, b goroutine) int {
    				return cmp.Compare(b.NonOverlappingStats[sortBy], a.NonOverlappingStats[sortBy])
    			})
    		} else {
    			// Sort by total time by default.
    			slices.SortFunc(goroutines, func(a, b goroutine) int {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 10.9K bytes
    - Viewed (0)
  3. src/cmd/trace/regions.go

    					maxTotal = r.TotalTime
    				}
    			}
    		}
    
    		// Sort.
    		sortBy := r.FormValue("sortby")
    		if _, ok := validNonOverlappingStats[sortBy]; ok {
    			slices.SortFunc(regions, func(a, b region) int {
    				return cmp.Compare(b.NonOverlappingStats[sortBy], a.NonOverlappingStats[sortBy])
    			})
    		} else {
    			// Sort by total time by default.
    			slices.SortFunc(regions, func(a, b region) int {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 14.3K bytes
    - Viewed (0)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. pkg/slices/slices_test.go

    			b.StopTimer()
    			ss := makeRandomStructs(N)
    			b.StartTimer()
    			SortStableFunc(ss, cmpFunc)
    		}
    	})
    	b.Run("SortBy", func(b *testing.B) {
    		cmpFunc := func(a *myStruct) int { return a.n }
    		for i := 0; i < b.N; i++ {
    			b.StopTimer()
    			ss := makeRandomStructs(N)
    			b.StartTimer()
    			SortBy(ss, cmpFunc)
    		}
    	})
    }
    
    func ExampleSort() {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri May 10 23:33:56 UTC 2024
    - 18.2K bytes
    - Viewed (0)
  9. cni/pkg/repair/repair_test.go

    			go c.Run(stop)
    			kube.WaitForCacheSync("test", stop, c.queue.HasSynced)
    
    			assert.EventuallyEqual(t, func() map[string]string {
    				havePods := c.pods.List(metav1.NamespaceAll, klabels.Everything())
    				slices.SortBy(havePods, func(a *corev1.Pod) string {
    					return a.Name
    				})
    				return makePodLabelMap(havePods)
    			}, tt.wantLabels)
    			if tt.wantCount > 0 {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Oct 24 03:31:28 UTC 2023
    - 10.6K bytes
    - Viewed (0)
  10. 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)
Back to top