code: func New(config *Config, commit string, logdir string) *Dashboard {
  	now := time.Now()
  	versionMeta := ""
  	if len(params.VersionMeta) > 0 {
  		versionMeta = fmt.Sprintf(" (%s)", params.VersionMeta)
  	}
  	return &Dashboard{
  		conns:  make(map[uint32]*client),
  		config: config,
  		quit:   make(chan chan error),
  		history: &Message{
  			General: &GeneralMessage{
  				Commit:  commit,
  				Version: fmt.Sprintf("v%d.%d.%d%s", params.VersionMajor, params.VersionMinor, params.VersionPatch, versionMeta),
  			},
  			System: &SystemMessage{
  				ActiveMemory:   emptyChartEntries(now, sampleLimit),
  				VirtualMemory:  emptyChartEntries(now, sampleLimit),
  				NetworkIngress: emptyChartEntries(now, sampleLimit),
  				NetworkEgress:  emptyChartEntries(now, sampleLimit),
  				ProcessCPU:     emptyChartEntries(now, sampleLimit),
  				SystemCPU:      emptyChartEntries(now, sampleLimit),
  				DiskRead:       emptyChartEntries(now, sampleLimit),
  				DiskWrite:      emptyChartEntries(now, sampleLimit),
  			},
  		},
  		logdir: logdir,
  	}
  }
docs: // New creates a new dashboard instance with the given configuration.