runGcCli function
CLI adapter for fdb gc.
Output contract (human-readable):
GC_COMPLETE HEAP_BEFORE=bytes HEAP_AFTER=bytes HEAP_DELTA=bytes
Output contract (--json / KEY=value):
HEAP_BEFORE=bytes
HEAP_AFTER=bytes
HEAP_DELTA=bytes
Error cases:
ERROR: No app is running. (no session / no isolates)
ERROR: All isolates failed to GC. (all isolates errored)
ERROR: message (generic error)
Implementation
Future<int> runGcCli(List<String> args) {
final parser = ArgParser()
..addFlag('json', negatable: false, help: 'Output KEY=value tokens instead of human-readable summary');
return runCliAdapter(parser, args, _execute);
}