mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
![]() For some of the more complex salt code--or when salt functions lack timing stats themselves--it's desirable to be able to do thus: ```sls {%- profile as 'inner test' %} < jinja-code > {%- endprofile %} ``` And get a log line like thus: ``` 2019-08-05 22:10:59,531 [salt.utils.jinja ][PROFILE ][26803] Time (in seconds) to render profile block 'inner test': 5.96046447754e-06 ``` This commit adds a new `profile` block tag that emits these log statements. The same machinery used to support the `profile` block tag is also wired into `import_*` blocks. For example: ```sls {%- import grains.sls as 'blah' %} ``` results in the following log statement: ``` 2019-08-05 22:10:59,542 [salt.utils.jinja ][PROFILE ][26803] Time (in seconds) to render import_yaml 'grains.sls': 0.0106961727142 ``` |
||
---|---|---|
.. | ||
.scripts | ||
_ext | ||
_incl | ||
_static | ||
_templates | ||
_themes | ||
cheatsheet | ||
man | ||
ref | ||
security | ||
topics | ||
apidoc-saltmods.sh | ||
conf.py | ||
contents.rst | ||
faq.rst | ||
favicon.ico | ||
gen_gource | ||
glossary.rst | ||
Makefile | ||
spelling_wordlist.txt |