如何在Crypto ++库基准测试中运行? [英] How can I run in Crypto++ library benchmarks test?

查看:82
本文介绍了如何在Crypto ++库基准测试中运行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以帮助我如何在Crypto ++基准测试中运行吗?

Can someone help me how can I run in Crypto++ benchmarks test?

我必须做一些测试.我找到了Crypto ++,但是我不知道如何在 Crypto ++ 中使用基准测试.我也想在安装库之后运行它们.

I have to make some tests. I found Crypto++ but I don't know how use benchmarks test in Crypto++. I also want to run them after installing the library.

感谢您的帮助.

推荐答案

有人可以帮助我如何在Crypto ++基准测试中运行吗?

Can someone help me how can I run in Crypto++ benchmarks test?

$ cd cryptopp-src
$ make static cryptest.exe
$ ./cryptest.exe b 3 2.76566 > benchmarks.html

cryptest.exe 采用三个参数:(1) b 用于基准测试,(2) time 用于每个测试的时间,以秒,以及(3) freq (以GiHz为单位的CPU频率).上面的示例中,每个测试运行3秒钟.CPU为2.8 GHz,大约为2.76566 GiHz.

cryptest.exe takes three arguments: (1) b for benchmarks, (2) time for the length of each test, in seconds, and (3) freq for CPU frequency in GiHz. The example above, each test is run for 3 seconds. And the CPU is 2.8 GHz, which works out to be about 2.76566 GiHz.

您也可以做这个小把戏.它将产生一个格式正确的HTML页面:

You can also do this little trick. It will produce a well-formed HTML page:

$ CRYPTOPP_CPU_FREQ=2.76566 make bench

IF 您正在使用Crypto ++ 5.6.5或更早版本,然后使用 CRYPTOPP_CPU_SPEED .如果您使用的是Crypto ++ 6.0或更高版本,请使用 CRYPTOPP_CPU_FREQ .

IF you are using Crypto++ 5.6.5 or earlier, then use CRYPTOPP_CPU_SPEED. If you are using Crypto++ 6.0 or later, then use CRYPTOPP_CPU_FREQ.

测试的输出类似于 Crypto ++ 5.6.0基准.生成结果需要5到10分钟.

The output of the tests will look similar to Crypto++ 5.6.0 Benchmarks. It takes 5 or 10 minutes to produce the results.

感兴趣的源文件是 test.cpp (处理 cryptest.exe b 选项), bench1.cpp bench2.cpp (基于算法实现基准测试).

The source files of interest are test.cpp (handles the b option of cryptest.exe), bench1.cpp and bench2.cpp (implements the benchmarking based on algorithm).

我们最近添加了涵盖基准的Wiki页面.它讨论了基本的内容,例如如何运行基准套件.它还讨论了库的该部分如何运行,例如算法注册自身的方式以及基准的计时方式.另请参阅Crypto ++ Wiki上的基准.

We recently added a wiki page covering Benchmarks. It discusses the basic stuff like how to run the benchmark suite. It also discusses how that portion of the library operates, like the way algorithms register themselves and how the benchmarks are timed. Also see Benchmarks on the Crypto++ wiki.

这篇关于如何在Crypto ++库基准测试中运行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆