《云原生机密计算最佳实践白皮书》——05编程框架——Apache Teaclave Java TEE SDK: 面向Java生态的机密计算编程框架——Apache_Teaclave_ Java_TEE_SDK 最佳实践(3) https://developer.aliyun.com/article/1231434?groupCode=aliyun_linux
3.3 运行tests
cd /opt/javaenclave/test && ./run.sh
........... .enter test case: org.apache.teaclave.javasdk.test.host.TestSMEnclave exit test case: org.apache.teaclave.javasdk.test.host.TestSMEnclave .enter test case: org.apache.teaclave.javasdk.test.host.TestSMEnclave exit test case: org.apache.teaclave.javasdk.test.host.TestSMEnclave .enter test case: org.apache.teaclave.javasdk.test.host.TestSMEnclave exit test case: org.apache.teaclave.javasdk.test.host.TestSMEnclave Time: 109.616 OK (16 tests) Teaclave java sdk ut result: true
3.4 运行benchmark
cd /opt/javaenclave/benchmark
运行 Guomi Benchmark:
cd guomi && ./run.sh
REMEMBER: The numbers below are just data. To gain reusable insights, you need to follow up on why the numbers are the way they are. Use profifilers (see -prof, -lprof), design factorial experiments, perform baseline and negative tests that provide experimental control, make sure the benchmarking environment is safe on JVM/OS/HW level, ask for reviews from the domain experts. Do not assume the numbers tell you what you want them to tell. Benchmark (enclaveServiceInstance) (smAlgo) Mode Cnt Score Error Units GuoMiBenchMark.smBenchMark MOCK_IN_JVM SM2 avgt 4 39.032 ? 39.471 ms/op GuoMiBenchMark.smBenchMark MOCK_IN_JVM SM3 avgt 4 8.656 ? 0.302 ms/op GuoMiBenchMark.smBenchMark MOCK_IN_JVM SM4 avgt 4 3.410 ? 0.153 ms/op GuoMiBenchMark.smBenchMark MOCK_IN_SVM SM2 avgt 4 31.899 ? 1.003 ms/op GuoMiBenchMark.smBenchMark MOCK_IN_SVM SM3 avgt 4 10.755 ? 2.616 ms/op GuoMiBenchMark.smBenchMark MOCK_IN_SVM SM4 avgt 4 4.515 ? 0.303 ms/op GuoMiBenchMark.smBenchMark TEE_SDK SM2 avgt 4 36.113 ? 2.337 ms/op GuoMiBenchMark.smBenchMark TEE_SDK SM3 avgt 4 11.331 ? 1.379 ms/op GuoMiBenchMark.smBenchMark TEE_SDK SM4 avgt 4 10.292 ? 0.896 ms/op GuoMiBenchMark.smBenchMark EMBEDDED_LIB_OS SM2 avgt 4 32.058 ? 14.033 ms/op GuoMiBenchMark.smBenchMark EMBEDDED_LIB_OS SM3 avgt 4 10.380 ? 0.741 ms/op GuoMiBenchMark.smBenchMark EMBEDDED_LIB_OS SM4 avgt 4 9.190 ? 0.488 ms/op Benchmark result is saved to guomi_benchmark.json
运行 String Benchmark:
cd string && ./run.sh
REMEMBER: The numbers below are just data. To gain reusable insights, you need to follow up on why the numbers are the way they are. Use profifilers (see -prof, -lprof), design factorial experiments, perform baseline and negative tests that provide experimental control, make sure the benchmarking environment is safe on JVM/OS/HW level, ask for reviews from the domain experts. Do not assume the numbers tell you what you want them to tell. Benchmark (enclaveServiceInstance) (stringOpt) Mode Cnt Score Error Units StringBenchMark.stringBenchMark MOCK_IN_JVM regex avgt 4 2.788 ? 0.090 ms/op StringBenchMark.stringBenchMark MOCK_IN_JVM concat avgt 4 2.692 ? 0.139 ms/op StringBenchMark.stringBenchMark MOCK_IN_JVM split avgt 4 2.698 ? 0.129 ms/op StringBenchMark.stringBenchMark MOCK_IN_SVM regex avgt 4 4.558 ? 0.084 ms/op StringBenchMark.stringBenchMark MOCK_IN_SVM concat avgt 4 4.879 ? 0.200 ms/op StringBenchMark.stringBenchMark MOCK_IN_SVM split avgt 4 5.595 ? 0.186 ms/op StringBenchMark.stringBenchMark TEE_SDK regex avgt 4 5.377 ? 0.176 ms/op StringBenchMark.stringBenchMark TEE_SDK concat avgt 4 5.269 ? 0.119 ms/op StringBenchMark.stringBenchMark TEE_SDK split avgt 4 6.171 ? 0.403 ms/op StringBenchMark.stringBenchMark EMBEDDED_LIB_OS regex avgt 4 4.104 ? 0.992 ms/op StringBenchMark.stringBenchMark EMBEDDED_LIB_OS concat avgt 4 6.140 ? 0.278 ms/op StringBenchMark.stringBenchMark EMBEDDED_LIB_OS split avgt 4 4.305 ? 0.585 ms/op Benchmark result is saved to string_benchmark.json
《云原生机密计算最佳实践白皮书》——05编程框架——Apache Teaclave Java TEE SDK: 面向Java生态的机密计算编程框架——Apache_Teaclave_ Java_TEE_SDK 最佳实践(5) https://developer.aliyun.com/article/1231430?groupCode=aliyun_linux