diff --git a/src/feelpp/benchmarking/report/templates/dashboardOverview.adoc.j2 b/src/feelpp/benchmarking/report/templates/dashboardOverview.adoc.j2 index 7fe4fdafd..04a0d1e1a 100644 --- a/src/feelpp/benchmarking/report/templates/dashboardOverview.adoc.j2 +++ b/src/feelpp/benchmarking/report/templates/dashboardOverview.adoc.j2 @@ -9,7 +9,8 @@ {% if "leaves" in aggregated["data"] %} {% set agg = { "date":"first", - "runs.num_failures": "max" + "runs.num_failures": "max", + "runs.num_cases": "max" } %} {% if "machines" in aggregated["data"].columns %} @@ -30,13 +31,26 @@ [.scrollable] -- -[cols="^1,^2,^1,^1,^1, options="header"] +[cols="^1,^1,^1,^2,^1,^1,^1", options="header"] |=== -| Status | Date | machine | application | Use Case +| Success % | #Testcases | #Failures | Date | machine | application | Use Case {% for row in df.to_dict(orient="records") %} {% set row_url = "leaves/"+row["leaves"]+"/leaf.adoc" %} -|{% if row["runs.num_failures"] == 0 %}🟢{% else %}🔴{% endif %} | xref:{{row_url}}[{{ row["date"] }}] | {{ row["machines"] }} | {{ row["applications"] }} | {{ row["use_cases"] }} +{% set total = row["runs.num_cases"] %} +{% set failures = row["runs.num_failures"] %} + +{% set success_pct = ((total - failures) / total * 100) if total > 0 else 0 %} +{% set pct_fmt = "%.0f"|format(success_pct) %} +{% set bar_color = "#28a745" if success_pct == 100 else ("#fd7e14" if success_pct >= 80 else "#dc3545") %} + +| pass:[
{{ pct_fmt }}%] +| {{ total }} +| {{ failures }} +| xref:{{row_url}}[{{ row["date"] }}] +| {{ row["machines"] }} +| {{ row["applications"] }} +| {{ row["use_cases"] }} {% endfor %} |=== @@ -51,4 +65,4 @@ initTable(table, 'filterParamTable'); }); -++++ \ No newline at end of file +++++ diff --git a/src/feelpp/benchmarking/report/templates/summaryTable.adoc.j2 b/src/feelpp/benchmarking/report/templates/summaryTable.adoc.j2 index 3273de688..eaa449784 100644 --- a/src/feelpp/benchmarking/report/templates/summaryTable.adoc.j2 +++ b/src/feelpp/benchmarking/report/templates/summaryTable.adoc.j2 @@ -5,25 +5,49 @@ -- {%if "latest_leaf" in repo_table.columns %} -[cols="^1,^3,^3,^3,^3,^3", options="header"] +[cols="^1,^1,^1,^1,^3,^3", options="header"] |=== -| | *{{ child_repo_type }}* | Latest | # Runs | # Test Cases | # Failures +| % Success | # Runs | # Test Cases | # Failures | *{{ child_repo_type }}* | Latest {% for row in repo_table.reset_index().to_dict(orient="records") %} {% set row_url = "leaves/"+row["latest_leaf"]+"/leaf.adoc" %} -|{% if row["result"] == "pass" %}🟢{% else %}🔴{% endif %} | {{ row[repo_table.index.name] }} | xref:{{row_url}}[{{row["latest"]}}] | {{ row["num_runs"] }} | {{ row["num_cases"] }} | {{ row["num_failures"] }} + +{% set total = row["num_cases"] %} +{% set failures = row["num_failures"] %} + +{% set success_pct = ((total - failures) / total * 100) if total > 0 else 0 %} +{% set pct_fmt = "%.0f"|format(success_pct) %} +{% set bar_color = "#28a745" if success_pct == 100 else ("#fd7e14" if success_pct >= 80 else "#dc3545") %} + +| pass:[ {{ pct_fmt }}%] +| {{ row["num_runs"] }} +| {{ total }} +| {{ failures }} +| {{ row[repo_table.index.name] }} +| xref:{{row_url}}[{{row["latest"]}}] {% endfor %} |=== {%else%} -[cols="^1,^3,^3,^3,^3", options="header"] +[cols="^1,^1,^1,^1,^3", options="header"] |=== -| | *{{ child_repo_type }}* | # Runs | # Test Cases | # Failures +| Success % | # Runs | # Test Cases | # Failures | *{{ child_repo_type }}* {% for row in repo_table.reset_index().to_dict(orient="records") %} -{%set row_url = "leaves/"+row["leaves"]+"/leaf.adoc" %} -|{% if row["result"] == "pass" %}🟢{% else %}🔴{% endif %} | xref:{{row_url}}[{{ row[repo_table.index.name] }}] | {{ row["num_runs"] }} | {{ row["num_cases"] }} | {{ row["num_failures"] }} +{% set row_url = "leaves/"+row["leaves"]+"/leaf.adoc" %} +{% set total = row["num_cases"] %} +{% set failures = row["num_failures"] %} + +{% set success_pct = ((total - failures) / total * 100) if total > 0 else 0 %} +{% set pct_fmt = "%.0f"|format(success_pct) %} +{% set bar_color = "#28a745" if success_pct == 100 else ("#fd7e14" if success_pct >= 80 else "#dc3545") %} + +| pass:[ {{ pct_fmt }}%] +| {{ row["num_runs"] }} +| {{ total }} +| {{ failures }} +| xref:{{row_url}}[{{ row[repo_table.index.name] }}] {% endfor %} |=== @@ -47,4 +71,4 @@ }); }); -++++ \ No newline at end of file +++++