code: func NewEngine(path string, c Config, options ...Option) *Engine {
  	e := &Engine{
  		config:              c,
  		path:                path,
  		defaultMetricLabels: prometheus.Labels{},
  		logger:              zap.NewNop(),
  	}
  
  	// Initialize series file.
  	e.sfile = tsdb.NewSeriesFile(c.GetSeriesFilePath(path))
  
  	// Initialise index.
  	e.index = tsi1.NewIndex(e.sfile, c.Index,
  		tsi1.WithPath(c.GetIndexPath(path)))
  
  	// Initialize WAL
  	var wal tsm1.Log = new(tsm1.NopWAL)
  	if c.WAL.Enabled {
  		e.wal = tsm1.NewWAL(c.GetWALPath(path))
  		e.wal.WithFsyncDelay(time.Duration(c.WAL.FsyncDelay))
  		e.wal.EnableTraceLogging(c.TraceLoggingEnabled)
  		wal = e.wal
  	}
  
  	// Initialise Engine
  	e.engine = tsm1.NewEngine(c.GetEnginePath(path), e.index, c.Engine,
  		tsm1.WithWAL(wal),
  		tsm1.WithTraceLogging(c.TraceLoggingEnabled))
  
  	// Apply options.
  	for _, option := range options {
  		option(e)
  	}
  	// Set default metrics labels.
  	e.engine.SetDefaultMetricLabels(e.defaultMetricLabels)
  	e.sfile.SetDefaultMetricLabels(e.defaultMetricLabels)
  	e.index.SetDefaultMetricLabels(e.defaultMetricLabels)
  
  	return e
  }
docs: // NewEngine initialises a new storage engine, including a series file, index and
  // TSM engine.