docs: function startFPSMonitor() {
          checkInit();
          var data = new Data();
          var w = new MonitorWidget("FPS", "", 2 /* HideMax */ | 1 /* HideMin */ | 4 /* HideMean */ | 32 /* RoundValues */);
          container.appendChild(w.element);
          var samples = [];
          var last = 0;
          function update(now) {
              var elapsed = (now - (last === 0 ? now : last)) / 1000;
              var fps = 1 / elapsed;
              if (fps !== Infinity) {
                  if (samples.length === 64) {
                      samples.shift();
                  }
                  samples.push(fps);
                  var sum = 0;
                  for (var i = 0; i < samples.length; i++) {
                      sum += samples[i];
                  }
                  var mean = sum / samples.length;
                  data.addSample(mean);
                  w.addResult(data.calc());
              }
              last = now;
              requestAnimationFrame(update);
          }
          requestAnimationFrame(update);
      }