Have you visited Reference page? If so, than you should know that returned by micros() value is :
http://arduino.cc/en/Reference/Micros
Returns
Number of microseconds since the program started (unsigned long)
Than, you have also call to the plot() inside the loop, why you don't measure a time?
Third, serial print is slow, change your sketch in a way, that you keep timing measurements results in global variables, for example time_filter, time_plot etc, and print results ONLY by request. Here is just an idea, not working code for you:
void loop()
{
// Serial.print("time_sample: "); //time measurement and serial print
time_start = micros(); //time measurement and serial print
Filter.run(data1); //time measurement and serial print
time_filter = micros() - time_start; //time measurement and serial print
// Serial.println(time_sampl); //time measurement and serial print
time_start = micros(); //time measurement and serial print
data1 = analogRead(0);
data2= Filter.run(data1);
data3 = analogRead(2);
data4 = analogRead(3);
time_sampl = micros() - time_start; //time measurement and serial print
time_start = micros(); //time measurement and serial print
plot(data1,data2,data3,data4); //Plots 4 channels of data
time_plot = micros() - time_start; //time measurement and serial print
//CONSOLE COMMAND LINE INTERFACE
if (Serial.available() > 0) {
incomingByte = Serial.read();
if (incomingByte == 'm') { // FREE MEMORY BYTES
Serial.println(freeRam());
}
if (incomingByte == 'x') {
for (int i = 0; i < FFT_SIZE; i++){
Serial.print("\t");
Serial.print( xin[i], DEC );
if ((i+1)%16 == 0) Serial.print("\n");
}
Serial.print("\n");
}
}
}
And last, doing measurements of sampling, you should discover that analogRead takes ~120 usec each, about 500 usec by 4 reads, so if loop contains sampling and nothing else inside, your maximum sampling rate is 2 kHz