Gitlab service upgraded. Please report any problems to dl_gitadmin@cs.lth.se

Commit 41b379c5 authored by Noric Couderc's avatar Noric Couderc

Added methods to CollectionApplication

Some methods of the Collection where never called during the benchmarks. Added
run* methods that do run the missing methods.
parent ef959bef
......@@ -10,6 +10,31 @@ public class ListApplication extends CollectionApplication<List<Integer>> {
super(seed, applicationSize, init);
}
public void runAdd2() {
if (dataStructure.isEmpty()) {
dataStructure.add(0, randomGenerator.nextInt());
return;
}
dataStructure.add(generateIndex(), randomGenerator.nextInt());
}
public void runAddAll2() {
if (dataStructure.isEmpty()) {
dataStructure.addAll(0, argument);
return;
}
dataStructure.addAll(generateIndex(), argument);
}
public void runRemove2() {
if (dataStructure.isEmpty()) { return; }
dataStructure.remove(generateIndex());
}
public void runSort() {
dataStructure.sort(Integer::compareTo);
}
public void runGet() {
if (dataStructure.isEmpty()) { return; }
dataStructure.get(generateIndex());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment