Show a run's duration on the Gym

9673a86cb249 · AtlantisPleb · · parent a0222791cfd8

Show a run's duration on the Gym

The column existed in the schema and the API and nowhere a reader
looks. Duration is the local lane's whole cost — the first qwen oracle
cut 18.5 minutes to 69 seconds, a delta the board could not show.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GoYpb8FEmdxVErsv7ABCYi
Co-Authored-By
Claude Fable 5 <noreply@anthropic.com>

Deploy story

What this commit did to the running system — joined from the forge receipt chain, the part a commit page elsewhere cannot show.

pushed
by user · WAL seq 325 · 2026-08-25T02:08:08.216735Z

Changed files

  • modified lib/openagents_web/live/gym_live.ex

Diff

1 file changed, +12 -0

lib/openagents_web/live/gym_live.ex modified +12

@@ -54,6 +54,16 @@ defmodule OpenAgentsWeb.GymLive do

54 54
  defp dollars(nil), do: "—"
55 55
  defp dollars(microusd), do: "$#{Float.round(microusd / 1_000_000, 4)}"
56 56
57
  defp elapsed(nil), do: "—"
58
59
  defp elapsed(seconds) when seconds < 60, do: "#{seconds}s"
60
61
  defp elapsed(seconds) do
62
    minutes = div(seconds, 60)
63
    rest = rem(seconds, 60)
64
    if(rest == 0, do: "#{minutes}m", else: "#{minutes}m #{rest}s")
65
  end
66
57 67
  defp tokens(nil, nil), do: "—"
58 68
  defp tokens(input, output), do: "#{format_count(input)} in / #{format_count(output)} out"
59 69

@@ -107,6 +117,7 @@ defmodule OpenAgentsWeb.GymLive do

107 117
                <th>Lane</th>
108 118
                <th>Score</th>
109 119
                <th>Tasks</th>
120
                <th>Duration</th>
110 121
                <th>Tokens</th>
111 122
                <th>Cost</th>
112 123
              </tr>

@@ -127,6 +138,7 @@ defmodule OpenAgentsWeb.GymLive do

127 138
                <td>{run.lane || "—"}</td>
128 139
                <td class="font-semibold">{percent(Run.score(run))}</td>
129 140
                <td>{run.tasks_passed}/{run.tasks_total}</td>
141
                <td class="whitespace-nowrap">{elapsed(run.duration_seconds)}</td>
130 142
                <td class="whitespace-nowrap text-sm">
131 143
                  {tokens(run.input_tokens, run.output_tokens)}
132 144
                </td>

This page updates live while a promote is in flight · changelog