Measuring ADC sample rate - Arduino DUE
Measure how many times per second was main loop called:

bool secondPassed()
{
  static long lastTick = 0;
  long now = millis();

  if (now &lt;= lastTick + 1000)
    return false;

  lastTick = now;
  return true;
}

int counter = 0;
void loop()
{
  analogRead(A0);
  counter++;
  if (secondPassed())
  {
    Serial.println(counter);
    counter = 0;
  }
}