Search Options

Results per page
Sort
Preferred Languages
Advance

Results 71 - 80 of 364 for Cmp (0.04 sec)

  1. src/sort/gen_sort_variants.go

    			Path:       "zsortordered.go",
    			Package:    "slices",
    			Imports:    "import \"cmp\"\n",
    			FuncSuffix: "Ordered",
    			TypeParam:  "[E cmp.Ordered]",
    			ExtraParam: "",
    			ExtraArg:   "",
    			DataType:   "[]E",
    			Funcs: template.FuncMap{
    				"Less": func(name, i, j string) string {
    					return fmt.Sprintf("cmp.Less(%s[%s], %s[%s])", name, i, name, j)
    				},
    				"Swap": func(name, i, j string) string {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:27 UTC 2023
    - 19.6K bytes
    - Viewed (0)
  2. src/cmd/trace/goroutines.go

    		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 {
    				return cmp.Compare(b.TotalTime, a.TotalTime)
    			})
    		}
    
    		// Write down all the non-overlapping stats and sort them.
    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/slices/slices.go

    // pair of elements.
    // The result is the first non-zero result of cmp; if cmp always
    // returns 0 the result is 0 if len(s1) == len(s2), -1 if len(s1) < len(s2),
    // and +1 if len(s1) > len(s2).
    func CompareFunc[S1 ~[]E1, S2 ~[]E2, E1, E2 any](s1 S1, s2 S2, cmp func(E1, E2) int) int {
    	for i, v1 := range s1 {
    		if i >= len(s2) {
    			return +1
    		}
    		v2 := s2[i]
    		if c := cmp(v1, v2); c != 0 {
    			return c
    		}
    	}
    	if len(s1) < len(s2) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 29 14:01:59 UTC 2024
    - 13.6K bytes
    - Viewed (0)
  4. pkg/scheduler/framework/plugins/noderesources/requested_to_capacity_ratio_test.go

    See the License for the specific language governing permissions and
    limitations under the License.
    */
    
    package noderesources
    
    import (
    	"context"
    	"fmt"
    	"testing"
    
    	"github.com/google/go-cmp/cmp"
    	"github.com/stretchr/testify/assert"
    	v1 "k8s.io/api/core/v1"
    	"k8s.io/apimachinery/pkg/util/validation/field"
    	"k8s.io/klog/v2/ktesting"
    	"k8s.io/kubernetes/pkg/scheduler/apis/config"
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Dec 15 03:30:06 UTC 2023
    - 21.2K bytes
    - Viewed (0)
  5. pkg/controller/garbagecollector/dump_test.go

    limitations under the License.
    */
    
    package garbagecollector
    
    import (
    	"bytes"
    	"os"
    	"path/filepath"
    	"testing"
    
    	"github.com/google/go-cmp/cmp"
    
    	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
    	"k8s.io/apimachinery/pkg/types"
    	"k8s.io/apimachinery/pkg/util/dump"
    )
    
    var (
    	alphaNode = func() *node {
    		return &node{
    			identity: objectReference{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Apr 14 00:05:53 UTC 2023
    - 11.2K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apiserver/pkg/storage/testing/utils.go

    limitations under the License.
    */
    
    package testing
    
    import (
    	"bytes"
    	"context"
    	"fmt"
    	"path"
    	"reflect"
    	"sync"
    	"sync/atomic"
    	"testing"
    	"time"
    
    	"github.com/google/go-cmp/cmp"
    	"k8s.io/apimachinery/pkg/api/meta"
    	v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
    	"k8s.io/apimachinery/pkg/runtime"
    	"k8s.io/apimachinery/pkg/util/wait"
    	"k8s.io/apimachinery/pkg/watch"
    	"k8s.io/apiserver/pkg/apis/example"
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 22 07:26:55 UTC 2024
    - 10.3K bytes
    - Viewed (0)
  7. pilot/pkg/model/service.go

    // code is specific to individual proxy implementations
    
    package model
    
    import (
    	"fmt"
    	"net/netip"
    	"sort"
    	"strconv"
    	"strings"
    	"time"
    
    	"github.com/google/go-cmp/cmp"
    	"github.com/google/go-cmp/cmp/cmpopts"
    	"github.com/mitchellh/copystructure"
    	"google.golang.org/protobuf/proto"
    	"k8s.io/apimachinery/pkg/types"
    
    	"istio.io/api/label"
    	"istio.io/istio/pilot/pkg/features"
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed May 29 02:03:58 UTC 2024
    - 46.3K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/conversion/webhook_converter_test.go

    See the License for the specific language governing permissions and
    limitations under the License.
    */
    
    package conversion
    
    import (
    	"reflect"
    	"strings"
    	"testing"
    
    	"github.com/google/go-cmp/cmp"
    
    	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
    	"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
    	"k8s.io/apimachinery/pkg/runtime"
    	"k8s.io/apimachinery/pkg/util/validation"
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 13 15:27:39 UTC 2023
    - 19.2K bytes
    - Viewed (0)
  9. pilot/pkg/networking/util/util_test.go

    	cloned2 := CloneClusterLoadAssignment(testCla)
    	if !cmp.Equal(testCla, cloned, protocmp.Transform()) {
    		t.Fatalf("expected %v to be the same as %v", testCla, cloned)
    	}
    	cloned.ClusterName = "foo"
    	cloned.Endpoints[0].LbEndpoints[0].LoadBalancingWeight.Value = 5
    	if cmp.Equal(testCla, cloned, protocmp.Transform()) {
    		t.Fatalf("expected %v to be the different from %v", testCla, cloned)
    	}
    	if !cmp.Equal(testCla, cloned2, protocmp.Transform()) {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed May 29 01:17:58 UTC 2024
    - 40K bytes
    - Viewed (0)
  10. pkg/controller/tainteviction/taint_eviction_test.go

    				Type:    "Normal",
    				Count:   1,
    				Message: "Marking for deletion Pod test/test",
    				Source:  corev1.EventSource{Component: "nodeControllerTest"},
    			},
    		}
    		if diff := cmp.Diff(want, recorder.Events, cmp.FilterPath(f, cmp.Ignore())); len(diff) > 0 {
    			t.Errorf("emitPodDeletionEvent() returned data (-want,+got):\n%s", diff)
    		}
    	})
    
    	t.Run("emitCancelPodDeletionEvent", func(t *testing.T) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 25 14:24:16 UTC 2024
    - 31.3K bytes
    - Viewed (0)
Back to top