summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorjwansek <eddie.atten.ea29@gmail.com>2022-02-12 13:19:48 +0000
committerjwansek <eddie.atten.ea29@gmail.com>2022-02-12 13:19:48 +0000
commit376c8bef903657e020e482037b94a7b63514f640 (patch)
tree9bfc9a3e843c3dbad56189a79f18451c7d86ad12 /templates
parent08cefb0e7490dd229eed93a556591c1993eee07b (diff)
downloadSmarker-376c8bef903657e020e482037b94a7b63514f640.tar.gz
Smarker-376c8bef903657e020e482037b94a7b63514f640.zip
added rendering runtime analysis to markdown
Diffstat (limited to 'templates')
-rw-r--r--templates/md.jinja228
-rw-r--r--templates/txt.jinja22
2 files changed, 29 insertions, 1 deletions
diff --git a/templates/md.jinja2 b/templates/md.jinja2
index 400da26..f998f7c 100644
--- a/templates/md.jinja2
+++ b/templates/md.jinja2
@@ -100,6 +100,34 @@ Please note that this file cannot be analysed or have tests preformed upon it-
{{ expand_function(function_name, function_contents)|indent(8, True) }}
{%- endfor -%}
{%- endif -%}
+{% if "run" in files_contents.keys() %}
+ - #### Runtime Analysis:
+{%- set flat_runtime = flatten_struct(files_contents["run"]) %}
+{%- for cmd, runtime_contents in flat_runtime.items() %}
+ - ##### Command `{{ cmd }}`:
+ - **Monitor:**
+{%- if "monitor" in runtime_contents.keys() %}
+ - {{ runtime_contents["monitor"] }}
+{%- else %}
+ - stdout
+{%- endif %}
+ - **Regexes:**
+{%- for regex_, results in runtime_contents["regexes"].items() %}
+ - `{{regex_}}`:
+ - Found occurrences: {{ len_(results) }}
+{%- if md_show_all_regex_occurrences == "True" and len_(results) > 0 %}
+ - Occurrences list:
+{%- for result in results %}
+ - `{{ result }}`
+{%- endfor -%}
+{%- if txt_show_all_run_output == "True" %}
+ - Full runtime output:
+{{ code_block(runtime_contents["full_output"])|indent(24, True) }}
+{%- endif -%}
+{%- endif -%}
+{%- endfor -%}
+{%- endfor -%}
+{%- endif -%}
{%- endif -%}
{% else %}
- [ ] File not present
diff --git a/templates/txt.jinja2 b/templates/txt.jinja2
index b27abda..5ca0c62 100644
--- a/templates/txt.jinja2
+++ b/templates/txt.jinja2
@@ -131,7 +131,7 @@ Report generated at {{ get_datetime() }}
{{ runtime_contents["full_output"]|indent(20, False) }}
```
{%- endif -%}
- {%- endfor -%}
+ {%- endfor -%}
{%- endif -%}
{%- endif -%}
{% else %}