show error figures
This commit is contained in:
parent
2372fc14d6
commit
d9f60e7fa3
|
@ -9,6 +9,13 @@ def format_width_percentage(x):
|
|||
return format(100.0 * x, "#.1f") + '%'
|
||||
|
||||
|
||||
def calc_figures(row):
|
||||
successful_transactions = row['successful_transactions']
|
||||
processed_transactions = row['processed_transactions']
|
||||
banking_stage_errors = row['banking_stage_errors']
|
||||
txerrors = processed_transactions - successful_transactions
|
||||
row['txerrors'] = txerrors
|
||||
|
||||
def calc_bars(row):
|
||||
successful_transactions = row['successful_transactions']
|
||||
processed_transactions = row['processed_transactions']
|
||||
|
@ -65,12 +72,15 @@ def run_query():
|
|||
|
||||
for row in maprows:
|
||||
calc_bars(row)
|
||||
calc_figures(row)
|
||||
|
||||
return maprows
|
||||
|
||||
|
||||
def main():
|
||||
run_query()
|
||||
|
||||
|
||||
if __name__=="__main__":
|
||||
main()
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<tr>
|
||||
<th class="text-muted">Slot #</th>
|
||||
<th class="text-muted">Block content (log scale)</th>
|
||||
<th class="text-muted text-end">Tx errors/total</th>
|
||||
<th class="text-muted text-end">Tx success/processed/banking stage</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="list">
|
||||
|
@ -35,12 +35,12 @@
|
|||
|
||||
</td>
|
||||
<td class="text-end">
|
||||
{% if True %}
|
||||
<span class="text-danger">130</span>
|
||||
{% elif False %}
|
||||
<span class="text-primary">0</span>
|
||||
{% endif %}
|
||||
/<span class="text-primary">2000</span></td>
|
||||
|
||||
<span class="text-primary">process:{{ block.processed_transactions }}</span>
|
||||
<span class="text-primary text-warning">fail:{{ block.txerrors }}</span>
|
||||
<span class="text-primary text-danger">bank:{{ block.banking_stage_errors }}</span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
|
|
Loading…
Reference in New Issue