export function createOperationBatchMetrics(args) {
    return {
        ...args.previousMetrics,
        ...(args.didRunRecalc
            ? {
                dirtyFormulaCount: args.previousMetrics.dirtyFormulaCount,
                wasmFormulaCount: args.previousMetrics.wasmFormulaCount + args.directFormulaMetrics.wasmFormulaCount,
                jsFormulaCount: args.previousMetrics.jsFormulaCount + args.directFormulaMetrics.jsFormulaCount,
            }
            : {
                dirtyFormulaCount: 0,
                wasmFormulaCount: args.directFormulaMetrics.wasmFormulaCount,
                jsFormulaCount: args.directFormulaMetrics.jsFormulaCount,
                rangeNodeVisits: 0,
                recalcMs: 0,
            }),
        batchId: args.previousMetrics.batchId + 1,
        changedInputCount: args.changedInputCount + args.formulaChangedCount,
        compileMs: args.compileMs,
    };
}
//# sourceMappingURL=operation-batch-metrics.js.map