public void testSpeed(IndexVotable x) { long start = System.currentTimeMillis(); for (int i = 0; i < ivotes.length; i++) { x.voteIndexVoteSet(ivotes[i]); } NameVotingSystem.NameVote[] winners = x.getWinners(); long end = System.currentTimeMillis(); double vps = ivotes.length / ((double) (end - start) / 1000.0); System.out.println(x.name() + ": " + vps + " votes/second"); }