Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for isQuantity (0.75 sec)

  1. staging/src/k8s.io/apiserver/pkg/cel/library/quantity_test.go

    		},
    		{
    			name:        "isQuantity",
    			expr:        `isQuantity("20")`,
    			expectValue: trueVal,
    		},
    		{
    			name:        "isQuantity_megabytes",
    			expr:        `isQuantity("20M")`,
    			expectValue: trueVal,
    		},
    		{
    			name:        "isQuantity_mebibytes",
    			expr:        `isQuantity("20Mi")`,
    			expectValue: trueVal,
    		},
    		{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Apr 23 17:22:44 UTC 2024
    - 8.6K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/cel/library/cost.go

    				cost += uint64(math.Ceil(float64(otherSize) * common.StringTraversalCostFactor))
    			}
    
    			return &cost
    		}
    	case "quantity", "isQuantity":
    		if len(args) >= 1 {
    			cost := uint64(math.Ceil(float64(actualSize(args[0])) * common.StringTraversalCostFactor))
    			return &cost
    		}
    	case "validate":
    		if len(args) >= 2 {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Apr 23 17:22:44 UTC 2024
    - 20.6K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiserver/pkg/cel/library/cost_test.go

    			expectRuntimeCost:   1,
    		},
    		{
    			name:                "isQuantity",
    			expr:                `isQuantity("20")`,
    			expectEstimatedCost: checker.CostEstimate{Min: 1, Max: 1},
    			expectRuntimeCost:   1,
    		},
    		{
    			name:                "isQuantity_megabytes",
    			expr:                `isQuantity("20M")`,
    			expectEstimatedCost: checker.CostEstimate{Min: 1, Max: 1},
    			expectRuntimeCost:   1,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Apr 23 17:22:44 UTC 2024
    - 40.8K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/cel/validation_test.go

    			},
    		},
    		{name: "quantity",
    			obj:    objs("20", "200M"),
    			schema: schemas(stringType, stringType),
    			valid: []string{
    				"isQuantity(self.val1)",
    				"isQuantity(self.val2)",
    				`isQuantity("20Mi")`,
    				`quantity(self.val2) == quantity("0.2G") && quantity("0.2G") == quantity("200M")`,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 17:14:10 UTC 2024
    - 159.9K bytes
    - Viewed (0)
Back to top