agent_c 2.9 → 2.99

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d647a877e7e6660d1c9ab7f5e2ce9e00d8f932c78d9ca6a47467265cc2c62e4e
4
- data.tar.gz: 83e0796a0545c207c5afdebd457ac3134ea0b8bd5b9cd327a02de5f2049cc02b
3
+ metadata.gz: 79f0d67a835d59d209e68ed409334ca100b65d1caa8b3c43a26676ad0f32c027
4
+ data.tar.gz: fc55ea6795f45df4b3fe99c8418c5fef35a689661eacb9dac2b95fbaf91f7aaa
5
5
  SHA512:
6
- metadata.gz: a248627251111087a4814c86a5c980cdafa7936f0ae2b420b397485b367c7e0f693b2d4f6dcc6a46070c4381d2e2eaff775e31615bfdd5c0ea72e984655bec74
7
- data.tar.gz: ce5adb048f393142b008a15943e2337597f2969a76cd8446a1890e5440ad9c73d39af74052085d916b58fbbbd551a23385db2b6285f68e359f676b5fb5fa67d4
6
+ metadata.gz: 9d9559be33ba70c96b52345dbc7aff15dad021bf31cc1186a8ad23c886d169e8dabefe2e8ba37a02974c725e44a1e2f0d401a2d98a3590a3701f834ed3ab3b38
7
+ data.tar.gz: 5e8d33069f37e7b5e2ebd3432e85fe40f77f2f91c4b331cd32ebeb8d487c4ea69a894524c9190feab945089821aa5bc90ed51575fda37a4fd87e91ae249811e6
data/lib/agent_c/batch.rb CHANGED
@@ -46,11 +46,49 @@ module AgentC
46
46
  out.puts "Succeeded: #{succeeded_count}"
47
47
  out.puts "Pending: #{pending_count}"
48
48
  out.puts "Failed: #{failed_count}"
49
+ out.puts "Tasks: #{tasks.count}"
50
+
51
+ # Calculate time span
52
+ if tasks.any?
53
+ created_ats = tasks.map(&:created_at).compact
54
+ updated_ats = tasks.map(&:updated_at).compact
55
+
56
+ if created_ats.any? && updated_ats.any?
57
+ earliest = created_ats.min
58
+ latest = updated_ats.max
59
+ time_span_seconds = (latest - earliest).to_i
60
+
61
+ hours = time_span_seconds / 3600
62
+ minutes = (time_span_seconds % 3600) / 60
63
+ seconds = time_span_seconds % 60
64
+
65
+ out.puts "Time: #{hours} hrs, #{minutes} mins, #{seconds} secs"
66
+ end
67
+ end
68
+
69
+ # Count worktrees
70
+ worktree_count = store.workspace.count
71
+ out.puts "Worktrees: #{worktree_count}"
49
72
 
50
73
  cost_data = session.cost
51
74
  out.puts "Run cost: $#{'%.2f' % cost_data.run}"
52
75
  out.puts "Project total cost: $#{'%.2f' % cost_data.project}"
53
76
 
77
+ # Cost and time per task
78
+ if tasks.count > 0
79
+ cost_per_task = cost_data.run / tasks.count
80
+ out.puts "Cost per task: $#{'%.2f' % cost_per_task}"
81
+
82
+ if tasks.any? && created_ats&.any? && updated_ats&.any?
83
+ total_minutes = time_span_seconds / 60.0
84
+ # Account for parallelism: if we have multiple worktrees,
85
+ # tasks could run in parallel
86
+ effective_minutes = worktree_count > 0 ? total_minutes / worktree_count : total_minutes
87
+ minutes_per_task = effective_minutes / tasks.count
88
+ out.puts "Minutes per task: #{'%.2f' % minutes_per_task}"
89
+ end
90
+ end
91
+
54
92
  if failed_count > 0
55
93
  out.puts "\nFirst #{[failed_count, 3].min} failed task(s):"
56
94
  tasks.select { |task| task.failed? }.first(3).each do |task|
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AgentC
4
- VERSION = "2.9"
4
+ VERSION = "2.99"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: agent_c
3
3
  version: !ruby/object:Gem::Version
4
- version: '2.9'
4
+ version: '2.99'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pete Kinnecom