www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.ldc - What is the document about the trace of ldc2

reply d007 <d007 gmail.com> writes:
for example, what is mean for:

```sh
"ts":95407,"dur":2450
```

ts vs dur, what is the difference.  and what is the unit of the 
time?


maybe add a percent of time cost.
Apr 10 2023
parent reply "Richard (Rikki) Andrew Cattermole" <richard cattermole.co.nz> writes:
The time trace format that ldc outputs comes from Google.

It is used by Chrome's dev tools; Chrome has a built in visualizer for 
the format (now deprecated): chrome://tracing

Perfetto should be preferred instead: https://ui.perfetto.dev/

File format documentation (out of date): 
https://docs.google.com/document/d/1CvAClvFfyA5R-PhYUmn5OOQtYMH4h6I0nSsKchNAySU/preview

You need to use a visualizer to make sense of the data. Such as the 
bundled with ldc tool timetrace2txt.
Apr 10 2023
next sibling parent d007 <d007 gmail.com> writes:
On Monday, 10 April 2023 at 13:43:09 UTC, Richard (Rikki) Andrew 
Cattermole wrote:
 The time trace format that ldc outputs comes from Google.

 It is used by Chrome's dev tools; Chrome has a built in 
 visualizer for the format (now deprecated): chrome://tracing

 Perfetto should be preferred instead: https://ui.perfetto.dev/

 File format documentation (out of date): 
 https://docs.google.com/document/d/1CvAClvFfyA5R-PhYUmn5OOQtYMH4h6I0nSsKchNAySU/preview

 You need to use a visualizer to make sense of the data. Such as 
 the bundled with ldc tool timetrace2txt.
thanks for explain. ui.perfetto.dev work well.
Apr 10 2023
prev sibling parent reply d007 <d007 gmail.com> writes:
On Monday, 10 April 2023 at 13:43:09 UTC, Richard (Rikki) Andrew 
Cattermole wrote:
 The time trace format that ldc outputs comes from Google.

 It is used by Chrome's dev tools; Chrome has a built in 
 visualizer for the format (now deprecated): chrome://tracing

 Perfetto should be preferred instead: https://ui.perfetto.dev/

 File format documentation (out of date): 
 https://docs.google.com/document/d/1CvAClvFfyA5R-PhYUmn5OOQtYMH4h6I0nSsKchNAySU/preview

 You need to use a visualizer to make sense of the data. Such as 
 the bundled with ldc tool timetrace2txt.
I build with -O0 and -c to check the build time cost. (avoid link and too much Optimize) I find the write file(s) process take 60% time for most case. the output object file size is not big(like 1.4M), but take 650ms. is there some time coat action for Write file(s) ?
Apr 10 2023
parent d007 <d007 gmail.com> writes:
On Monday, 10 April 2023 at 14:20:26 UTC, d007 wrote:
 On Monday, 10 April 2023 at 13:43:09 UTC, Richard (Rikki) 
 Andrew Cattermole wrote:
 [...]
I build with -O0 and -c to check the build time cost. (avoid link and too much Optimize) I find the write file(s) process take 60% time for most case. the output object file size is not big(like 1.4M), but take 650ms. is there some time coat action for Write file(s) ?
for a large projects , write file(s) process cost more than 75%. and ldc2 get more slower for recent version.
Apr 10 2023