Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted as Java by Ivan ( 16 years ago )
int count = 20;
double all = 0.0;
for (int i = 0; i < count; ++i) {
long begin = Calendar.getInstance().getTimeInMillis();
dao.findAll();
long end = Calendar.getInstance().getTimeInMillis();
long diff = end - begin;
all += diff;
System.err.println("Iteration #" + (i + 1) + " " + diff + " ms");
}
double middle = all / (double) count;
System.err.println("Average time is " + middle + " ms");
Revise this Paste
Children: 25919