function addMetric(sheetName, column, value, options = {}) {
  const { timestamp = Date.now(), filePath = METRICS_FILE } = options;
  // Before adding a metric, setup the temporary metric file
  initMetricsFile(filePath);

  const metrics = readMetricFile(filePath); // Initial value: [[]]

  // Add the metric to the first item. Other processes may add other rows.
  metrics[0].push({ sheet: sheetName, metric: String(column), value, t: timestamp });
  fs.writeFileSync(filePath, JSON.stringify(metrics, undefined, '  '));

  return metrics;
}
/**
 * Adds a metric to the metric file. Synchronous
 * @param sheetName - will become the sheetname that the metric is added too.
 * @param column
 * @param value
 * @param options {object}
 * @param options.timestamp
 * @param options.filePath
 * @returns {Object}
 */
Adds a metric to the metric file. Synchronous
@param sheetName - will become the sheetname that the metric is added too.
Adds a metric to the metric file . Synchronous @param sheetName - will become the sheetname that the metric is added too .
function addMetric(sheetName, column, value, options = {}) {
  const { timestamp = Date.now(), filePath = METRICS_FILE } = options;
  initMetricsFile(filePath);
  const metrics = readMetricFile(filePath); 
  metrics[0].push({ sheet: sheetName, metric: String(column), value, t: timestamp });
  fs.writeFileSync(filePath, JSON.stringify(metrics, undefined, '  '));
  return metrics;
}
function addMetric ( sheetName , column , value , options = { } ) { const { timestamp = Date . now ( ) , filePath = METRICS_FILE } = options ; initMetricsFile ( filePath ) ; const metrics = readMetricFile ( filePath ) ; metrics [ 0 ] . push ( { sheet : sheetName , metric : String ( column ) , value , t : timestamp } ) ; fs . writeFileSync ( filePath , JSON . stringify ( metrics , undefined , '  ' ) ) ; return metrics ; }
Adds a metric to the metric file.
Adds a metric to the metric file .
// Before adding a metric, setup the temporary metric file // Initial value: [[]] // Add the metric to the first item. Other processes may add other rows.