Class: LlmCostTracker::Reconciliation::DiffResult
- Inherits:
-
Data
- Object
- Data
- LlmCostTracker::Reconciliation::DiffResult
- Defined in:
- lib/llm_cost_tracker/reconciliation/diff_result.rb
Instance Attribute Summary collapse
-
#currency ⇒ Object
readonly
Returns the value of attribute currency.
-
#delta_amount ⇒ Object
readonly
Returns the value of attribute delta_amount.
-
#delta_percent ⇒ Object
readonly
Returns the value of attribute delta_percent.
-
#local_total ⇒ Object
readonly
Returns the value of attribute local_total.
-
#local_total_source ⇒ Object
readonly
Returns the value of attribute local_total_source.
-
#non_cost_rows ⇒ Object
readonly
Returns the value of attribute non_cost_rows.
-
#non_cost_rows_total ⇒ Object
readonly
Returns the value of attribute non_cost_rows_total.
-
#period_end ⇒ Object
readonly
Returns the value of attribute period_end.
-
#period_start ⇒ Object
readonly
Returns the value of attribute period_start.
-
#provider ⇒ Object
readonly
Returns the value of attribute provider.
-
#provider_total ⇒ Object
readonly
Returns the value of attribute provider_total.
-
#scope ⇒ Object
readonly
Returns the value of attribute scope.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
-
#unmatched_local_calls ⇒ Object
readonly
Returns the value of attribute unmatched_local_calls.
-
#unmatched_local_calls_total ⇒ Object
readonly
Returns the value of attribute unmatched_local_calls_total.
-
#unmatched_provider_rows ⇒ Object
readonly
Returns the value of attribute unmatched_provider_rows.
-
#unmatched_provider_rows_total ⇒ Object
readonly
Returns the value of attribute unmatched_provider_rows_total.
Instance Method Summary collapse
- #aligned?(threshold_percent: Reconciliation::DEFAULT_THRESHOLD_PERCENT) ⇒ Boolean
- #non_cost_rows_truncated? ⇒ Boolean
- #unmatched_local_calls_truncated? ⇒ Boolean
- #unmatched_provider_rows_truncated? ⇒ Boolean
Instance Attribute Details
#currency ⇒ Object (readonly)
Returns the value of attribute currency
5 6 7 |
# File 'lib/llm_cost_tracker/reconciliation/diff_result.rb', line 5 def currency @currency end |
#delta_amount ⇒ Object (readonly)
Returns the value of attribute delta_amount
5 6 7 |
# File 'lib/llm_cost_tracker/reconciliation/diff_result.rb', line 5 def delta_amount @delta_amount end |
#delta_percent ⇒ Object (readonly)
Returns the value of attribute delta_percent
5 6 7 |
# File 'lib/llm_cost_tracker/reconciliation/diff_result.rb', line 5 def delta_percent @delta_percent end |
#local_total ⇒ Object (readonly)
Returns the value of attribute local_total
5 6 7 |
# File 'lib/llm_cost_tracker/reconciliation/diff_result.rb', line 5 def local_total @local_total end |
#local_total_source ⇒ Object (readonly)
Returns the value of attribute local_total_source
5 6 7 |
# File 'lib/llm_cost_tracker/reconciliation/diff_result.rb', line 5 def local_total_source @local_total_source end |
#non_cost_rows ⇒ Object (readonly)
Returns the value of attribute non_cost_rows
5 6 7 |
# File 'lib/llm_cost_tracker/reconciliation/diff_result.rb', line 5 def non_cost_rows @non_cost_rows end |
#non_cost_rows_total ⇒ Object (readonly)
Returns the value of attribute non_cost_rows_total
5 6 7 |
# File 'lib/llm_cost_tracker/reconciliation/diff_result.rb', line 5 def non_cost_rows_total @non_cost_rows_total end |
#period_end ⇒ Object (readonly)
Returns the value of attribute period_end
5 6 7 |
# File 'lib/llm_cost_tracker/reconciliation/diff_result.rb', line 5 def period_end @period_end end |
#period_start ⇒ Object (readonly)
Returns the value of attribute period_start
5 6 7 |
# File 'lib/llm_cost_tracker/reconciliation/diff_result.rb', line 5 def period_start @period_start end |
#provider ⇒ Object (readonly)
Returns the value of attribute provider
5 6 7 |
# File 'lib/llm_cost_tracker/reconciliation/diff_result.rb', line 5 def provider @provider end |
#provider_total ⇒ Object (readonly)
Returns the value of attribute provider_total
5 6 7 |
# File 'lib/llm_cost_tracker/reconciliation/diff_result.rb', line 5 def provider_total @provider_total end |
#scope ⇒ Object (readonly)
Returns the value of attribute scope
5 6 7 |
# File 'lib/llm_cost_tracker/reconciliation/diff_result.rb', line 5 def scope @scope end |
#source ⇒ Object (readonly)
Returns the value of attribute source
5 6 7 |
# File 'lib/llm_cost_tracker/reconciliation/diff_result.rb', line 5 def source @source end |
#unmatched_local_calls ⇒ Object (readonly)
Returns the value of attribute unmatched_local_calls
5 6 7 |
# File 'lib/llm_cost_tracker/reconciliation/diff_result.rb', line 5 def unmatched_local_calls @unmatched_local_calls end |
#unmatched_local_calls_total ⇒ Object (readonly)
Returns the value of attribute unmatched_local_calls_total
5 6 7 |
# File 'lib/llm_cost_tracker/reconciliation/diff_result.rb', line 5 def unmatched_local_calls_total @unmatched_local_calls_total end |
#unmatched_provider_rows ⇒ Object (readonly)
Returns the value of attribute unmatched_provider_rows
5 6 7 |
# File 'lib/llm_cost_tracker/reconciliation/diff_result.rb', line 5 def unmatched_provider_rows @unmatched_provider_rows end |
#unmatched_provider_rows_total ⇒ Object (readonly)
Returns the value of attribute unmatched_provider_rows_total
5 6 7 |
# File 'lib/llm_cost_tracker/reconciliation/diff_result.rb', line 5 def unmatched_provider_rows_total @unmatched_provider_rows_total end |
Instance Method Details
#aligned?(threshold_percent: Reconciliation::DEFAULT_THRESHOLD_PERCENT) ⇒ Boolean
36 37 38 39 40 41 |
# File 'lib/llm_cost_tracker/reconciliation/diff_result.rb', line 36 def aligned?(threshold_percent: Reconciliation::DEFAULT_THRESHOLD_PERCENT) return true if provider_total.zero? && local_total.zero? return false if delta_percent.nil? delta_percent.abs <= threshold_percent end |
#non_cost_rows_truncated? ⇒ Boolean
32 33 34 |
# File 'lib/llm_cost_tracker/reconciliation/diff_result.rb', line 32 def non_cost_rows_truncated? non_cost_rows.size < non_cost_rows_total end |
#unmatched_local_calls_truncated? ⇒ Boolean
28 29 30 |
# File 'lib/llm_cost_tracker/reconciliation/diff_result.rb', line 28 def unmatched_local_calls_truncated? unmatched_local_calls.size < unmatched_local_calls_total end |
#unmatched_provider_rows_truncated? ⇒ Boolean
24 25 26 |
# File 'lib/llm_cost_tracker/reconciliation/diff_result.rb', line 24 def unmatched_provider_rows_truncated? unmatched_provider_rows.size < unmatched_provider_rows_total end |