@rfany/rf 0.13.0 → 0.13.1
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.
- package/package.json +1 -1
- package/rf.mjs +4 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rfany/rf",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.1",
|
|
4
4
|
"description": "rollforward's command line for people: what its page does, from a shell or a desktop agent, as you",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": { "type": "git", "url": "git+https://github.com/spoj/rollforward.git", "directory": "cli" },
|
package/rf.mjs
CHANGED
|
@@ -94,10 +94,10 @@ rf indexes [--json] each index of a source you index, all for admi
|
|
|
94
94
|
its phase, crawl or follow, pages read, when last caught up, and its error and next try
|
|
95
95
|
rf runs [PATH] [--since DATE] [--failed] [--running] [--long MIN] [--json]
|
|
96
96
|
a line per run: start, path, run, outcome, time, cost, what started it, and any error;
|
|
97
|
-
the outcome is done, interrupted by a person, cut by a restart
|
|
98
|
-
credits, policy, time limit or other
|
|
97
|
+
the outcome is done, interrupted by a person, cut, by a restart or a change that broke its
|
|
98
|
+
lease, running, or failed, for credits, policy, time limit or other
|
|
99
99
|
rf costs [PATH] [--since DATE] [--by workspace|series|person|day|outcome] [--json] totals, runs and cost per run; person
|
|
100
|
-
is the runner; runs leave out those
|
|
100
|
+
is the runner; runs leave out those that were cut, as the next run carries each on
|
|
101
101
|
rf activity [PATH] [--since DATE] [--json] per instance, what people and the agent said, what people uploaded and closed, and
|
|
102
102
|
each run that failed
|
|
103
103
|
rf wakes [PATH] [--json] each series' pending wakes and requests to start an instance, and when a wake of it last
|
|
@@ -630,7 +630,7 @@ else if (cmd === 'comment' && args.length === 2) {
|
|
|
630
630
|
outcome: r => r.failure ? `failed, ${r.failure}` : r.outcome,
|
|
631
631
|
}[by];
|
|
632
632
|
if (!key) throw new Error('--by: workspace, series, person, day or outcome');
|
|
633
|
-
// A run
|
|
633
|
+
// A run that was cut is carried on by the next, so it adds its cost, not a run.
|
|
634
634
|
const sums = new Map (), rows = await runsIn(args[0]), counted = (r ) => r.outcome === 'cut' ? 0 : 1;
|
|
635
635
|
for (const r of rows) sums.set(key(r), { runs: (sums.get(key(r))?.runs ?? 0) + counted(r), cost: (sums.get(key(r))?.cost ?? 0) + r.cost });
|
|
636
636
|
const out = [...sums].map(([k, v]) => ({ [by]: k, runs: v.runs, cost: +v.cost.toFixed(4), per_run: v.runs ? +(v.cost / v.runs).toFixed(4) : null }))
|