RecorderOperation — the three standard operations on auto-collected traversal data.
Data is collected during the single DFS traversal. The consumer chooses the operation at READ time:
get(id)
getByKey(id)
accumulate(fn, init, k)
aggregate(fn, init)
Recorders declare a preferredOperation to hint the UI about which operation to show prominently. The consumer can override via constructor options.
preferredOperation
import { MetricRecorder, RecorderOperation } from 'footprintjs';// Use named constant (autocomplete)new MetricRecorder({ preferredOperation: RecorderOperation.Aggregate });// Or inline string (same type)new MetricRecorder({ preferredOperation: 'accumulate' }); Copy
import { MetricRecorder, RecorderOperation } from 'footprintjs';// Use named constant (autocomplete)new MetricRecorder({ preferredOperation: RecorderOperation.Aggregate });// Or inline string (same type)new MetricRecorder({ preferredOperation: 'accumulate' });
RecorderOperation — the three standard operations on auto-collected traversal data.
Data is collected during the single DFS traversal. The consumer chooses the operation at READ time:
get(id)getByKey(id)accumulate(fn, init, k)accumulate(fn, init, k)aggregate(fn, init)aggregate(fn, init)Recorders declare a
preferredOperationto hint the UI about which operation to show prominently. The consumer can override via constructor options.