Skip to content

Commit

Permalink
Merge pull request #6 from gnosis/profiler_error
Browse files Browse the repository at this point in the history
#5 - Throw Error when profiler has wrong APP parameter.
  • Loading branch information
howardwu authored Dec 12, 2018
2 parents e98dd9c + 7afd0be commit 81d72a3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/java/profiler/utils/SparkUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ public class SparkUtils {
public static String appName(final String s) {
if (s.equals("fft")) {
return "SparkFFT";
} else if (s.equals("lagrange")) {
return "Lagrange";
} else if (s.equals("fmsm-g1")) {
return "SparkFixedMSMG1";
} else if (s.equals("fmsm-g2")) {
Expand All @@ -49,8 +51,10 @@ public static String appName(final String s) {
return "SparkZKSNARKLarge";
} else if (s.equals("vmsm-sorted-g1")) {
return "SparkVMSMSortedG1";
} else {
String exception = String.format("APP parameter '%s' not listed for profiling", s);
throw new IllegalArgumentException(exception);
}
return "default";
}

public static Class[] zksparkClasses() {
Expand Down

0 comments on commit 81d72a3

Please sign in to comment.