constructor(logger) {
    const Logger = require('./logger');
    if (typeof logger !== 'object' || Array.isArray(logger) || !(logger instanceof Logger)) {
      throw new Error('Logger is required for profiling');
    } else {
      this.logger = logger;
      this.start = Date.now();
    }
  }
Constructor function for the Profiler instance used by
`Logger.prototype.startTimer`. When done is called the timer will finish
and log the duration.
@param {!Logger} logger - TODO: add param description.
@private