code: public synchronized void updateByteMetrics(long bytesWritten, int branchIndex) {
      TaskMetrics metrics = TaskMetrics.get(this);
      String forkBranchId = TaskMetrics.taskInstanceRemoved(this.taskId);
  
      Counter taskByteCounter = metrics.getCounter(MetricGroup.TASK.name(), forkBranchId, BYTES);
      long inc = bytesWritten - taskByteCounter.getCount();
      taskByteCounter.inc(inc);
      metrics.getMeter(MetricGroup.TASK.name(), forkBranchId, BYTES_PER_SECOND).mark(inc);
      metrics.getCounter(MetricGroup.JOB.name(), this.jobId, BYTES).inc(inc);
      metrics.getMeter(MetricGroup.JOB.name(), this.jobId, BYTES_PER_SECOND).mark(inc);
    }
docs: Collect byte-level metrics.
  
  @param bytesWritten number of bytes written by the writer
  @param branchIndex fork branch index
  
  @deprecated see {@link org.apache.gobblin.instrumented.writer.InstrumentedDataWriterBase}.