toSampleType method

SampleType toSampleType()

Implementation

SampleType toSampleType() {
  switch (this) {
    case 'CPU':
      return SampleType.cpu;
    case 'MEMORY':
      return SampleType.memory;
    case 'THREADS':
      return SampleType.threads;
    case 'RX_RATE':
      return SampleType.rxRate;
    case 'TX_RATE':
      return SampleType.txRate;
    case 'RX':
      return SampleType.rx;
    case 'TX':
      return SampleType.tx;
    case 'NATIVE_FRAMES':
      return SampleType.nativeFrames;
    case 'NATIVE_FPS':
      return SampleType.nativeFps;
    case 'NATIVE_MIN_DRAWTIME':
      return SampleType.nativeMinDrawtime;
    case 'NATIVE_AVG_DRAWTIME':
      return SampleType.nativeAvgDrawtime;
    case 'NATIVE_MAX_DRAWTIME':
      return SampleType.nativeMaxDrawtime;
    case 'OPENGL_FRAMES':
      return SampleType.openglFrames;
    case 'OPENGL_FPS':
      return SampleType.openglFps;
    case 'OPENGL_MIN_DRAWTIME':
      return SampleType.openglMinDrawtime;
    case 'OPENGL_AVG_DRAWTIME':
      return SampleType.openglAvgDrawtime;
    case 'OPENGL_MAX_DRAWTIME':
      return SampleType.openglMaxDrawtime;
  }
  throw Exception('$this is not known in enum SampleType');
}