gpt4 book ai didi

linux - 衡量开发/随机效率

转载 作者:太空狗 更新时间:2023-10-29 11:03:43 26 4
gpt4 key购买 nike

作为一项任务,我必须衡量/dev/urandom 的效率。我有以下任务:检查,您可以在 1 分钟内从/dev/urandom 获取多少字节的数据。不要将获取的数据写入磁盘,因为它可能会降低一切速度。

我试过了

timeout 60s cat /dev/urandom | wc -c

但我收到的只是“已终止”消息。

最佳答案

添加--foreground选项:

timeout --foreground 60s cat /dev/urandom | wc -c

--foreground: when not running timeout directly from a shell prompt, allow COMMAND to read from the TTY and get TTY signals; in this mode, children of COMMAND will not be timed out

关于linux - 衡量开发/随机效率,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37377063/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com