Exception: Kumi::Core::Analyzer::PassBudgetError
- Inherits:
-
StandardError
- Object
- StandardError
- Kumi::Core::Analyzer::PassBudgetError
- Defined in:
- lib/kumi/core/analyzer/pass_manager.rb
Overview
Raised when a single analysis pass exceeds its wall-clock budget. This turns a runaway / non-terminating pass into a located failure (“which pass, how long, how big the input was”) instead of an indefinite hang.
Instance Attribute Summary collapse
-
#budget_ms ⇒ Object
readonly
Returns the value of attribute budget_ms.
-
#elapsed_ms ⇒ Object
readonly
Returns the value of attribute elapsed_ms.
-
#pass_name ⇒ Object
readonly
Returns the value of attribute pass_name.
Instance Method Summary collapse
-
#initialize(pass_name:, elapsed_ms:, budget_ms:, size_hint: nil) ⇒ PassBudgetError
constructor
A new instance of PassBudgetError.
Constructor Details
#initialize(pass_name:, elapsed_ms:, budget_ms:, size_hint: nil) ⇒ PassBudgetError
Returns a new instance of PassBudgetError.
14 15 16 17 18 19 20 21 22 |
# File 'lib/kumi/core/analyzer/pass_manager.rb', line 14 def initialize(pass_name:, elapsed_ms:, budget_ms:, size_hint: nil) @pass_name = pass_name @elapsed_ms = elapsed_ms @budget_ms = budget_ms size = size_hint ? " (#{size_hint})" : "" super("Pass #{pass_name} exceeded its compile budget: ran > #{budget_ms}ms#{size}. " \ "This usually means the schema is too large or hit a pathological " \ "compile path. Raise the budget with KUMI_PASS_BUDGET_MS or simplify the schema.") end |
Instance Attribute Details
#budget_ms ⇒ Object (readonly)
Returns the value of attribute budget_ms.
12 13 14 |
# File 'lib/kumi/core/analyzer/pass_manager.rb', line 12 def budget_ms @budget_ms end |
#elapsed_ms ⇒ Object (readonly)
Returns the value of attribute elapsed_ms.
12 13 14 |
# File 'lib/kumi/core/analyzer/pass_manager.rb', line 12 def elapsed_ms @elapsed_ms end |
#pass_name ⇒ Object (readonly)
Returns the value of attribute pass_name.
12 13 14 |
# File 'lib/kumi/core/analyzer/pass_manager.rb', line 12 def pass_name @pass_name end |