tapestry-cloud / tapestry

PHP static site generator using the plates template system
https://www.tapestry.cloud/
MIT License
32 stars 1 forks source link

Add breakdown to --stopwatch #183

Closed carbontwelve closed 7 years ago

carbontwelve commented 7 years ago
=== Breakdown by Step ===
+-----------------------+----------+--------------------+------------+-------------+
| Name                  | Time (s) | Memory Consumption | Memory Use | Memory Peak |
+-----------------------+----------+--------------------+------------+-------------+
| BootKernel            | 0.012    | 256 kb             | 2 mb       | 2 mb        |
| ReadCache             | 0.018    | 256 kb             | 2.25 mb    | 2.25 mb     |
| Before                | 0.003    | 0 b                | 2.25 mb    | 2.25 mb     |
| Clear                 | 0.001    | 0 b                | 2.25 mb    | 2.25 mb     |
| LoadContentTypes      | 0.003    | 0 b                | 2.25 mb    | 2.5 mb      |
| LoadContentRenderers  | 0.011    | 256 kb             | 2.5 mb     | 2.75 mb     |
| LoadContentGenerators | 0.005    | 256 kb             | 2.75 mb    | 2.75 mb     |
| LoadSourceFiles       | 0.469    | 768 kb             | 3.5 mb     | 3.5 mb      |
| Json                  | 0.001    | 0 b                | 3.5 mb     | 3.75 mb     |
| ParseContentTypes     | 1.134    | 768 kb             | 4.25 mb    | 4.5 mb      |
| Compile               | 3.147    | 2 mb               | 6.25 mb    | 6.25 mb     |
| WriteFiles            | 0.051    | 0 b                | 6.25 mb    | 6.25 mb     |
| WriteCache            | 0.032    | 0 b                | 6.25 mb    | 6.25 mb     |
| Copy                  | 0.067    | 0 b                | 6.25 mb    | 6.25 mb     |
| Clean                 | 0.269    | 0 b                | 6.25 mb    | 6.25 mb     |
| After                 | 0.002    | 0 b                | 6.25 mb    | 6.25 mb     |
+-----------------------+----------+--------------------+------------+-------------+
carbontwelve commented 7 years ago

Because the Compile step takes so long I have added stopwatches within it, which breaks the above view. Before this can become part of the project proper it needs to be sub-step aware.

This also needs unit tests!

carbontwelve commented 7 years ago
Task complete in: 6.064s [7.25 mb/7.25 mb]
=== Breakdown by Step ===
+-------------------------------------------+----------+--------------------+------------+-------------+
| Name                                      | Time (s) | Memory Consumption | Memory Use | Memory Peak |
+-------------------------------------------+----------+--------------------+------------+-------------+
| BootKernel                                | 0.011    | 0 b                | 2 mb       | 2 mb        |
| ReadCache                                 | 0.016    | 256 kb             | 2.25 mb    | 2.25 mb     |
| Before                                    | 0.003    | 0 b                | 2.25 mb    | 2.25 mb     |
| Clear                                     | 0.001    | 0 b                | 2.25 mb    | 2.25 mb     |
| LoadContentTypes                          | 0.003    | 0 b                | 2.25 mb    | 2.25 mb     |
| LoadContentRenderers                      | 0.01     | 512 kb             | 2.75 mb    | 2.75 mb     |
| LoadContentGenerators                     | 0.005    | 0 b                | 2.75 mb    | 2.75 mb     |
| LoadSourceFiles                           | 0.507    | 1 mb               | 3.75 mb    | 3.75 mb     |
| Json                                      | 0.001    | 0 b                | 3.75 mb    | 3.75 mb     |
| ParseContentTypes                         | 1.178    | 512 kb             | 4.25 mb    | 4.5 mb      |
| Compile                                   | 2.971    | 3 mb               | 7.25 mb    | 7.25 mb     |
| Compile.iterateProjectContentTypes        | 0.089    | 256 kb             | 4.5 mb     | 4.5 mb      |
| Compile.collectProjectFilesUseData        | 0.183    | 512 kb             | 5 mb       | 5 mb        |
| Compile.executeContentRenderers           | 2.599    | 1.5 mb             | 6.5 mb     | 6.5 mb      |
| Compile.mutateFilesToFilesystemInterfaces | 0.005    | 0 b                | 6.5 mb     | 6.5 mb      |
| WriteFiles                                | 0.599    | 0 b                | 7.25 mb    | 7.25 mb     |
| WriteCache                                | 0.033    | 0 b                | 7.25 mb    | 7.25 mb     |
| Copy                                      | 0.105    | 0 b                | 7.25 mb    | 7.25 mb     |
| Clean                                     | 0.163    | 0 b                | 7.25 mb    | 7.25 mb     |
| After                                     | 0.002    | 0 b                | 7.25 mb    | 7.25 mb     |
+-------------------------------------------+----------+--------------------+------------+-------------+
carbontwelve commented 7 years ago

This is solved by pull #191