Class: RubynCode::CLI::Commands::Tokens::TokenStats
- Inherits:
-
Data
- Object
- Data
- RubynCode::CLI::Commands::Tokens::TokenStats
- Defined in:
- lib/rubyn_code/cli/commands/tokens.rb
Instance Attribute Summary collapse
-
#actual_in ⇒ Object
readonly
Returns the value of attribute actual_in.
-
#actual_out ⇒ Object
readonly
Returns the value of attribute actual_out.
-
#estimated ⇒ Object
readonly
Returns the value of attribute estimated.
-
#message_count ⇒ Object
readonly
Returns the value of attribute message_count.
-
#threshold ⇒ Object
readonly
Returns the value of attribute threshold.
Instance Method Summary collapse
Instance Attribute Details
#actual_in ⇒ Object (readonly)
Returns the value of attribute actual_in
13 14 15 |
# File 'lib/rubyn_code/cli/commands/tokens.rb', line 13 def actual_in @actual_in end |
#actual_out ⇒ Object (readonly)
Returns the value of attribute actual_out
13 14 15 |
# File 'lib/rubyn_code/cli/commands/tokens.rb', line 13 def actual_out @actual_out end |
#estimated ⇒ Object (readonly)
Returns the value of attribute estimated
13 14 15 |
# File 'lib/rubyn_code/cli/commands/tokens.rb', line 13 def estimated @estimated end |
#message_count ⇒ Object (readonly)
Returns the value of attribute message_count
13 14 15 |
# File 'lib/rubyn_code/cli/commands/tokens.rb', line 13 def @message_count end |
#threshold ⇒ Object (readonly)
Returns the value of attribute threshold
13 14 15 |
# File 'lib/rubyn_code/cli/commands/tokens.rb', line 13 def threshold @threshold end |
Instance Method Details
#pct_threshold ⇒ Object
15 |
# File 'lib/rubyn_code/cli/commands/tokens.rb', line 15 def pct_threshold = ((estimated.to_f / threshold) * 100).round(1) |
#pct_window ⇒ Object
14 |
# File 'lib/rubyn_code/cli/commands/tokens.rb', line 14 def pct_window = ((estimated.to_f / CONTEXT_WINDOW) * 100).round(1) |
#total ⇒ Object
16 |
# File 'lib/rubyn_code/cli/commands/tokens.rb', line 16 def total = actual_in + actual_out |