Skip to content

Commit 3fe0c60

Browse files
author
Ferdinand Xu
committed
Rebase code
1 parent 6efee60 commit 3fe0c60

5 files changed

Lines changed: 19 additions & 25 deletions

File tree

conf/benchmark.properties.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ dataSize 1073741824
2020
operationSize 8192
2121

2222
bufferSize 20
23-
cipherClasses com.intel.chimera.cipher.OpensslCipher,com.intel.chimera.cipher.JceCipher
23+
cipherClasses org.apache.commons.crypto.cipher.OpensslCipher,org.apache.commons.crypto.cipher.JceCipher
2424
transformations AES/CTR/NoPadding,AES/CBC/NoPadding

src/test/java/com/intel/chimera/benchmark/ChimeraBenchmark.java renamed to src/test/java/org/apache/commons/crypto/benchmark/CommonsCryptoBenchmark.java

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,16 @@
1515
* See the License for the specific language governing permissions and
1616
* limitations under the License.
1717
*/
18-
package com.intel.chimera.benchmark;
18+
package org.apache.commons.crypto.benchmark;
1919

20-
import com.intel.chimera.benchmark.option.BenchmarkOption;
21-
import com.intel.chimera.benchmark.option.StreamOption;
22-
import com.intel.chimera.cipher.CipherTransformation;
20+
import org.apache.commons.crypto.benchmark.option.BenchmarkOption;
21+
import org.apache.commons.crypto.benchmark.option.StreamOption;
22+
import org.apache.commons.crypto.cipher.CipherTransformation;
2323

2424
import java.io.*;
2525
import java.util.Properties;
2626

27-
public class ChimeraBenchmark {
27+
public class CommonsCryptoBenchmark {
2828
static String defaultConfigPath = "./conf/benchmark.properties";
2929

3030
public static void main(String[] args) throws IOException {
@@ -33,12 +33,7 @@ public static void main(String[] args) throws IOException {
3333

3434
if (args != null && args.length != 0 && args.length != 1 && args.length != 4) {
3535
System.out.println(
36-
"Usage: java -Djava.library.path=\"$PATH\" -cp " +
37-
"ChimeraBenchmark-[version].jar:path/to/Chimera/target/test-classes/ com.intel.chimera.benchmark" +
38-
".ChimeraBenchmark [warmupIterations] [iterations] [dataSize] " +
39-
"[operationSize] or java -Djava.library.path=\"$PATH\" -cp " +
40-
"himeraBenchmark-[version].jar:path/to/Chimera/target/test-classes/ com.intel.chimera.benchmark" +
41-
".ChimeraBenchmark [path/to/configuration]");
36+
"Usage: java -Djava.library.path=\"$PATH\" -cp commons-crypto-[version].jar:path/to//target/test-classes/ org.apache.commons.crypto.CommonsCryptoBenchmark [warmupIterations] [iterations] [dataSize] [operationSize] or java -Djava.library.path=\"$PATH\" -cp commons-crypto-[version].jar:path/to/Chimera/target/test-classes/ org.apache.commons.crypto.CommonsCryptoBenchmark [path/to/configuration]");
4237
System.out.println("args[0]: " + args[0]);
4338
System.exit(1);
4439
}
@@ -59,7 +54,7 @@ public static void main(String[] args) throws IOException {
5954
} else {
6055
System.out.println(
6156
"can not find the configuration file under the current path");
62-
inputStream = ChimeraBenchmark.class.getClassLoader()
57+
inputStream = CommonsCryptoBenchmark.class.getClassLoader()
6358
.getResourceAsStream(propFileName);
6459
}
6560
prop.load(inputStream);
@@ -105,9 +100,8 @@ public static void main(String[] args) throws IOException {
105100
.getProperty(
106101
"transformations") : ("AES/CTR/NoPadding,AES/CBC/NoPadding");
107102
String cipherClazzNames = (prop.contains("cipherClasses")) ? prop
108-
.getProperty(
109-
"cipherClasses") : ("com.intel.chimera.cipher.OpensslCipher,com" +
110-
".intel.chimera.cipher.JceCipher");
103+
.getProperty("cipherClasses") : ("org.apache.commons.crypto.cipher" +
104+
".OpensslCipher,org.apache.commons.crypto.cipher.JceCipher");
111105
int bufferSize = (prop.containsKey("bufferSize")) ? Integer
112106
.parseInt(prop.getProperty("bufferSize")) : (512 * 1024);
113107
for (String t : transformations.split(",")) {

src/test/java/com/intel/chimera/benchmark/CryptoStreamBenchmark.java renamed to src/test/java/org/apache/commons/crypto/benchmark/CryptoStreamBenchmark.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@
1515
* See the License for the specific language governing permissions and
1616
* limitations under the License.
1717
*/
18-
package com.intel.chimera.benchmark;
18+
package org.apache.commons.crypto.benchmark;
1919

20-
import com.intel.chimera.benchmark.option.BenchmarkOption;
21-
import com.intel.chimera.benchmark.option.StreamOption;
22-
import com.intel.chimera.conf.ConfigurationKeys;
23-
import com.intel.chimera.stream.CryptoInputStream;
24-
import com.intel.chimera.stream.CryptoOutputStream;
20+
import org.apache.commons.crypto.benchmark.option.BenchmarkOption;
21+
import org.apache.commons.crypto.benchmark.option.StreamOption;
22+
import org.apache.commons.crypto.conf.ConfigurationKeys;
23+
import org.apache.commons.crypto.stream.CryptoInputStream;
24+
import org.apache.commons.crypto.stream.CryptoOutputStream;
2525

2626
import java.io.*;
2727
import java.util.Calendar;

src/test/java/com/intel/chimera/benchmark/option/BenchmarkOption.java renamed to src/test/java/org/apache/commons/crypto/benchmark/option/BenchmarkOption.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* See the License for the specific language governing permissions and
1616
* limitations under the License.
1717
*/
18-
package com.intel.chimera.benchmark.option;
18+
package org.apache.commons.crypto.benchmark.option;
1919

2020
public class BenchmarkOption {
2121
public int dataSize;

src/test/java/com/intel/chimera/benchmark/option/StreamOption.java renamed to src/test/java/org/apache/commons/crypto/benchmark/option/StreamOption.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
* See the License for the specific language governing permissions and
1616
* limitations under the License.
1717
*/
18-
package com.intel.chimera.benchmark.option;
18+
package org.apache.commons.crypto.benchmark.option;
1919

20-
import com.intel.chimera.cipher.CipherTransformation;
20+
import org.apache.commons.crypto.cipher.CipherTransformation;
2121

2222
public class StreamOption {
2323

0 commit comments

Comments
 (0)