Class: Agentilda::Executor::Result

Inherits:
Data
  • Object
show all
Defined in:
lib/agentilda/executor.rb

Overview

What one invocation did, and what it spent doing it.

#to_ary is deliberate: every caller of #call destructures ok, note = executor.call(...), and the meter is an addition to that answer rather than a replacement for it. Callers that want the tokens ask for them by name.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#delegatedInteger (readonly)

Returns of #up, how much arrived as an unsplit sub-agent total rather than as a direction of its own.

Returns:

  • (Integer)

    of #up, how much arrived as an unsplit sub-agent total rather than as a direction of its own



44
45
46
47
# File 'lib/agentilda/executor.rb', line 44

Result = Data.define(:ok, :note, :up, :down, :subagents, :delegated, :seconds) do
  # @return [Array(Boolean, String)]
  def to_ary = [ok, note]
end

#downInteger (readonly)

Returns tokens generated.

Returns:

  • (Integer)

    tokens generated



44
45
46
47
# File 'lib/agentilda/executor.rb', line 44

Result = Data.define(:ok, :note, :up, :down, :subagents, :delegated, :seconds) do
  # @return [Array(Boolean, String)]
  def to_ary = [ok, note]
end

#noteString (readonly)

Returns one line, for the report.

Returns:

  • (String)

    one line, for the report



44
45
46
47
# File 'lib/agentilda/executor.rb', line 44

Result = Data.define(:ok, :note, :up, :down, :subagents, :delegated, :seconds) do
  # @return [Array(Boolean, String)]
  def to_ary = [ok, note]
end

#okBoolean (readonly)

Returns:

  • (Boolean)


44
45
46
47
# File 'lib/agentilda/executor.rb', line 44

Result = Data.define(:ok, :note, :up, :down, :subagents, :delegated, :seconds) do
  # @return [Array(Boolean, String)]
  def to_ary = [ok, note]
end

#secondsFloat (readonly)

Returns wall clock, from argv to exit.

Returns:

  • (Float)

    wall clock, from argv to exit



44
45
46
47
# File 'lib/agentilda/executor.rb', line 44

Result = Data.define(:ok, :note, :up, :down, :subagents, :delegated, :seconds) do
  # @return [Array(Boolean, String)]
  def to_ary = [ok, note]
end

#subagentsInteger (readonly)

Returns sub-agents this agent spawned.

Returns:

  • (Integer)

    sub-agents this agent spawned



44
45
46
47
# File 'lib/agentilda/executor.rb', line 44

Result = Data.define(:ok, :note, :up, :down, :subagents, :delegated, :seconds) do
  # @return [Array(Boolean, String)]
  def to_ary = [ok, note]
end

#upInteger (readonly)

Returns tokens sent, sub-agents included.

Returns:

  • (Integer)

    tokens sent, sub-agents included



44
45
46
47
# File 'lib/agentilda/executor.rb', line 44

Result = Data.define(:ok, :note, :up, :down, :subagents, :delegated, :seconds) do
  # @return [Array(Boolean, String)]
  def to_ary = [ok, note]
end

Instance Method Details

#to_aryArray(Boolean, String)

Returns:

  • (Array(Boolean, String))


46
# File 'lib/agentilda/executor.rb', line 46

def to_ary = [ok, note]