Example #1
0
 public long getTimeForGettingStrings(Shortener shortener, Set<Long> ids, Set<String> strings) {
   long startedTime = new Date().getTime();
   for (Long id : ids) {
     strings.add(shortener.getString(id));
   }
   long endedTime = new Date().getTime();
   return endedTime - startedTime;
 }
Example #2
0
 public long getTimeForGettingIds(Shortener shortener, Set<String> strings, Set<Long> ids) {
   long startedTime = new Date().getTime();
   for (String str : strings) {
     ids.add(shortener.getId(str));
   }
   long endedTime = new Date().getTime();
   return endedTime - startedTime;
 }