Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for CostLimit (0.17 sec)

  1. staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/cel/compilation.go

    	prog, err := ruleEnv.Program(ast,
    		cel.CostLimit(perCallLimit),
    		cel.CostTracking(estimator),
    		cel.InterruptCheckFrequency(celconfig.CheckFrequency),
    	)
    	if err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu May 16 20:13:14 UTC 2024
    - 13.8K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/cel/environment/base.go

    			cel.CostEstimatorOptions(checker.PresenceTestHasCost(false)),
    		},
    		ProgramOptions: []cel.ProgramOption{
    			cel.EvalOptions(cel.OptOptimize, cel.OptTrackCost),
    			cel.CostLimit(celconfig.PerCallLimit),
    
    			// cel-go v0.17.7 change the cost of has() from 0 to 1, but also provided the CostEstimatorOptions option to preserve the old behavior, so we enabled it at the same time we bumped our cel version to v0.17.7.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 15 15:51:08 UTC 2024
    - 6.4K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiserver/pkg/cel/environment/environment.go

    	//
    	// If an added cel.Variable has an OpenAPI type, the type must be included in DeclTypes.
    	EnvOptions []cel.EnvOption
    	// ProgramOptions provides CEL ProgramOptions. This may be used to set a cel.CostLimit,
    	// enable optimizations, and set other program level options that should be enabled
    	// for all programs using this environment.
    	ProgramOptions []cel.ProgramOption
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 08 15:52:31 UTC 2023
    - 10.1K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/cel/compilation_test.go

    			expectCalcCostExceedsLimit: costLimit,
    			setMaxElements:             10,
    			expectedSetCost:            352,
    		},
    		{
    			name:                       "O(n^3) loop with numbers",
    			schemaGenerator:            genArrayWithRule("number", "self.all(x, self.all(y, self.all(z, true)))"),
    			expectCalcCostExceedsLimit: costLimit,
    			setMaxElements:             10,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu May 16 20:13:14 UTC 2024
    - 51.5K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apiserver/pkg/admission/plugin/cel/filter_test.go

    				environment.VersionedOptions{
    					IntroducedVersion: environment.DefaultCompatibilityVersion(),
    					ProgramOptions:    []celgo.ProgramOption{celgo.CostLimit(tc.testPerCallLimit)},
    				},
    			)
    			if err != nil {
    				t.Fatal(err)
    			}
    			c := NewFilterCompiler(env)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 10 22:07:40 UTC 2024
    - 40.4K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/validation/validation.go

    	}
    	return multiplyWithOverflowGuard(cr.MaxCost, cr.MaxCardinality)
    }
    
    func getCostErrorMessage(costName string, expressionCost, costLimit uint64) string {
    	exceedFactor := float64(expressionCost) / float64(costLimit)
    	var factor string
    	if exceedFactor > 100.0 {
    		// if exceedFactor is greater than 2 orders of magnitude, the rule is likely O(n^2) or worse
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 10 22:07:40 UTC 2024
    - 82.6K bytes
    - Viewed (0)
Back to top