Skip to content

Commit 7144866

Browse files
committed
添加耗时记录
1 parent e7f9c0a commit 7144866

1 file changed

Lines changed: 77 additions & 0 deletions

File tree

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# 性能记录
2+
3+
## WMF 图片转换
4+
5+
Commit: e7f9c0adfe736c56e4e0207c15701ccd92b822d1
6+
7+
测试设备:
8+
9+
- CPU: Hygon C86-3G-3G (OPN:3350)
10+
- 系统: Kylin Linux Desktop EDU V10 银河麒麟桌面操作系统(教育版)V10 2403
11+
12+
### 非 AOT 版本
13+
14+
```
15+
lindexi@lindexi-pc:~/lin/sync/lin64$ ./DotNetCampus.MediaConverter
16+
ReadJsonFile Cost 4ms
17+
ParseJsonFile Cost 5ms
18+
Start optimize image file. File='image.wmf' Total Cost 5ms
19+
Copy new file to '/home/lindexi/linux-x64/Test_ldaqazwr.3nx/Copy_1ckqx3ma.hht_image.wmf' Total Cost 183ms
20+
Copy new file Cost 179ms. ImageFile: '/home/lindexi/linux-x64/Test_ldaqazwr.3nx/Copy_1ckqx3ma.hht_image.wmf' Total Cost 183ms
21+
Start convert emf or wmf to png by Inkscape. File='/home/lindexi/linux-x64/Test_ldaqazwr.3nx/Copy_1ckqx3ma.hht_image.wmf' Total Cost 185ms
22+
Convert emf or wmf to svg by Inkscape failed. We will continue use libwmf to convert the image. File='/home/lindexi/linux-x64/Test_ldaqazwr.3nx/Copy_1ckqx3ma.hht_image.wmf' Exception: System.ComponentModel.Win32Exception (2): An error occurred trying to start process 'inkscape' with working directory '/home/lindexi/linux-x64'. No such file or directory
23+
at System.Diagnostics.Process.ForkAndExecProcess(ProcessStartInfo startInfo, String resolvedFilename, String[] argv, String[] envp, String cwd, Boolean setCredentials, UInt32 userId, UInt32 groupId, UInt32[] groups, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd, Boolean usesTerminal, Boolean throwOnNoExec)
24+
at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo)
25+
at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
26+
at DotNetCampus.MediaConverters.Imaging.Optimizations.EnhancedGraphicsMetafileOptimization.ConvertWithInkscape(ImageFileOptimizationContext context)
27+
Total Cost 201ms
28+
ConvertWithInkscape Cost 17ms Total Cost 202ms
29+
ConvertWithInkscapeLibWmf Cost 17ms Total Cost 220ms
30+
Load sk svg Cost 507ms Total Cost 729ms
31+
Save sk svg to png Cost 17ms. OutputFile='/home/lindexi/linux-x64/Test_ldaqazwr.3nx/SVG_gh1sulx2.ezs.png' Total Cost 747ms
32+
Convert svg to png file Cost 527ms. File='/home/lindexi/linux-x64/Test_ldaqazwr.3nx/FixSVG_csmcz2s1.p5b.svg' Total Cost 747ms
33+
ConvertWmfOrEmfToPngFile Cost 564ms. ImageFile: '/home/lindexi/linux-x64/Test_ldaqazwr.3nx/Copy_1ckqx3ma.hht_image.wmf' Total Cost 747ms
34+
Success ConvertWmfOrEmfToPngFile. Update current image file to '/home/lindexi/linux-x64/Test_ldaqazwr.3nx/SVG_gh1sulx2.ezs.png' Total Cost 748ms
35+
Start optimize image with ImageSharp. ImageFile: '/home/lindexi/linux-x64/Test_ldaqazwr.3nx/SVG_gh1sulx2.ezs.png' Total Cost 748ms
36+
Load image with ImageSharp Cost 79ms. ImageFile: '/home/lindexi/linux-x64/Test_ldaqazwr.3nx/SVG_gh1sulx2.ezs.png' Total Cost 827ms
37+
Optimize image with ImageSharp Cost 3ms. ImageFile: '/home/lindexi/linux-x64/Test_ldaqazwr.3nx/SVG_gh1sulx2.ezs.png' Total Cost 831ms
38+
Save optimized image with ImageSharp Cost 63ms. OutputImageFile: '/home/lindexi/linux-x64/Test_ldaqazwr.3nx/kipm4qr5.rav.png' Total Cost 895ms
39+
OptimizeImageFileAsync Cost 895ms. File='/home/lindexi/linux-x64/image.wmf'
40+
Success converted image. Cost 917ms. OutputFile='/home/lindexi/linux-x64/Test_ldaqazwr.3nx/1.png' Total Cost 895ms
41+
```
42+
43+
### AOT 版本
44+
45+
```
46+
lindexi@lindexi-pc:~/lin/sync/lin64$ ./DotNetCampus.MediaConverter
47+
ReadJsonFile Cost 0ms
48+
ParseJsonFile Cost 0ms
49+
Start optimize image file. File='image.wmf' Total Cost 0ms
50+
Check imageFile Exists Cost 0ms. Total Cost 0ms
51+
CreateDirectory workingFolder Cost 0ms. Total Cost 0ms
52+
Copy new file to '/home/lindexi/linux-x64/Test_3udgyrfq.ewe/Copy_cexmekrd.0ne_image.wmf' Total Cost 0ms
53+
Copy new file Cost 0ms. ImageFile: '/home/lindexi/linux-x64/Test_3udgyrfq.ewe/Copy_cexmekrd.0ne_image.wmf' Total Cost 0ms
54+
Start convert emf or wmf to png by Inkscape. File='/home/lindexi/linux-x64/Test_3udgyrfq.ewe/Copy_cexmekrd.0ne_image.wmf' Total Cost 0ms
55+
Convert emf or wmf to svg by Inkscape failed. We will continue use libwmf to convert the image. File='/home/lindexi/linux-x64/Test_3udgyrfq.ewe/Copy_cexmekrd.0ne_image.wmf' Exception: System.ComponentModel.Win32Exception (2): An error occurred trying to start process 'inkscape' with working directory '/home/lindexi/linux-x64'. No such file or directory
56+
at System.Diagnostics.Process.ForkAndExecProcess(ProcessStartInfo, String, String[], String[], String, Boolean, UInt32, UInt32, UInt32[], Int32&, Int32&, Int32&, Boolean, Boolean) + 0x404
57+
at System.Diagnostics.Process.StartCore(ProcessStartInfo) + 0x303
58+
at System.Diagnostics.Process.Start(ProcessStartInfo) + 0x3b
59+
at DotNetCampus.MediaConverters.Imaging.Optimizations.EnhancedGraphicsMetafileOptimization.ConvertWithInkscape(ImageFileOptimizationContext) + 0x1fe
60+
Total Cost 10ms
61+
ConvertWithInkscape Cost 10ms Total Cost 10ms
62+
Run wmf2svg process Cost 173ms Total Cost 184ms
63+
ConvertWithInkscapeLibWmf Cost 174ms Total Cost 184ms
64+
Load sk svg Cost 176ms Total Cost 361ms
65+
Save sk svg to png Cost 11ms. OutputFile='/home/lindexi/linux-x64/Test_3udgyrfq.ewe/SVG_gjvqrzhr.haf.png' Total Cost 373ms
66+
Convert svg to png file Cost 188ms. File='/home/lindexi/linux-x64/Test_3udgyrfq.ewe/FixSVG_ywzqj0xe.b0s.svg' Total Cost 373ms
67+
ConvertWmfOrEmfToPngFile Cost 373ms. ImageFile: '/home/lindexi/linux-x64/Test_3udgyrfq.ewe/Copy_cexmekrd.0ne_image.wmf' Total Cost 373ms
68+
Success ConvertWmfOrEmfToPngFile. Update current image file to '/home/lindexi/linux-x64/Test_3udgyrfq.ewe/SVG_gjvqrzhr.haf.png' Total Cost 373ms
69+
Start optimize image with ImageSharp. ImageFile: '/home/lindexi/linux-x64/Test_3udgyrfq.ewe/SVG_gjvqrzhr.haf.png' Total Cost 373ms
70+
Load image with ImageSharp Cost 1ms. ImageFile: '/home/lindexi/linux-x64/Test_3udgyrfq.ewe/SVG_gjvqrzhr.haf.png' Total Cost 374ms
71+
Optimize image with ImageSharp Cost 0ms. ImageFile: '/home/lindexi/linux-x64/Test_3udgyrfq.ewe/SVG_gjvqrzhr.haf.png' Total Cost 375ms
72+
Save optimized image with ImageSharp Cost 9ms. OutputImageFile: '/home/lindexi/linux-x64/Test_3udgyrfq.ewe/vuwjg5bf.xmt.png' Total Cost 384ms
73+
OptimizeImageFileAsync Cost 384ms. File='/home/lindexi/linux-x64/image.wmf'
74+
Success converted image. Cost 387ms. OutputFile='/home/lindexi/linux-x64/Test_3udgyrfq.ewe/1.png' Total Cost 384ms
75+
```
76+
77+
可见 AOT 的版本只需非 AOT 版本的一半时间

0 commit comments

Comments
 (0)