现有CinebenchR23程序日志某段信息如下:
Framework : OpenGL
Vendor : ATI Technologies Inc. (AMD)
Renderer : AMD Radeon RX 6600 LE
Framework version: 4.6.0 Compatibility Profile Context 24.2.1.240215
Driver version : 23.40.19.01-240215a1-400566C-AMD-Software-Adrenalin-Edition
CINEBENCH AUTORUN
Please wait until all tests are done!
Warning: Unknown arguments: -g_CinebenchCpuXTest=true
Warning: Unknown arguments: -g_CinebenchCpuXTest=true
来自 127.0.0.1 的回复: 字节=32 时间<1ms TTL=128
来自 127.0.0.1 的回复: 字节=32 时间<1ms TTL=128
Running Multiple CPU Render Test...
Minimum test duration: 600000.0 ms seconds.
来自 127.0.0.1 的回复: 字节=32 时间<1ms TTL=128
127.0.0.1 的 Ping 统计信息:
数据包: 已发送 = 5,已接收 = 5,丢失 = 0 (0% 丢失),
往返行程的估计时间(以毫秒为单位):
最短 = 0ms,最长 = 0ms,平均 = 0ms
瀹屾垚
请按任意键继续. . . Rendering...
Values: {13474.483} -> Avg/Deviation: 13474.483/0.000
Values: {13474.483,12739.790} -> Avg/Deviation: 13107.136/367.346
Values: {13474.483,12739.790,12486.068} -> Avg/Deviation: 12900.114/419.141
Values: {13474.483,12739.790,12486.068,12450.031} -> Avg/Deviation: 12787.593/411.997
Values: {13474.483,12739.790,12486.068,12450.031,12453.352} -> Avg/Deviation: 12720.745/392.005
Values: {13474.483,12739.790,12486.068,12450.031,12453.352,12381.667} -> Avg/Deviation: 12664.232/379.507
Values: {13474.483,12739.790,12486.068,12450.031,12453.352,12381.667,12364.501} -> Avg/Deviation: 12621.413/366.676
Values: {13474.483,12739.790,12486.068,12450.031,12453.352,12381.667,12364.501,12430.922} -> Avg/Deviation: 12597.602/348.731
Values: {13474.483,12739.790,12486.068,12450.031,12453.352,12381.667,12364.501,12430.922,12430.922} -> Avg/Deviation: 12579.082/332.934
Values: {13474.483,12739.790,12486.068,12450.031,12453.352,12381.667,12364.501,12430.922,12430.922,12366.235} -> Avg/Deviation: 12557.797/322.239
CB 12557.80 (0.00)
请教如何获取“,”和“}”信息中间的信息1,“:” 和“/”中间的信息2,以及最后面“/”后的数值,获取最终数值如下:
数值1:13474.483_数值2:13474.483_数值3:0.000
数值1:12739.790_数值2:13107.136_数值3:367.346
数值1:12486.068_数值2:12900.114_数值3:419.141
原本用下面代码是可以实现的,但是由于for中tokens不可为动态变量,导致运行出错。- @echo off & setlocal enabledelayedexpansion
- cd /d "%~dp0"
- set "count=1"
- for /f "tokens=%n%,6-7 delims={}:^/" %%a in ('type "R23日志.txt" ^| find /i "Values"') do (
- set /a "count+=1"
- echo 第!count!轮CPU参考分数:%%a___实际跑分:%%b___跑分差值:%%c
- )
- :end
- echo.
- echo CPU稳定性测试完成!
- echo.
- pause
复制代码 这个是日志下载地址:
https://sanli.lanzoue.com/b0foko6xi
密码:dvrj |