fix: compute net_bps and update best/worst before STATUS log
Reorder so the per-triangle STATUS log shows the current best value instead of the previous iteration's stale init value (-1e18). Also remove executor idle diagnostic line and restore pre-simulation best_net_bps tracking for ALL evaluated triangles, not just signal candidates.
This commit is contained in:
parent
2f518d1a2d
commit
b8d6499c33
|
|
@ -150,6 +150,15 @@ bool evaluate_symbol(evaluator_t *ev, uint16_t symbol_idx, int64_t t_sock_arrive
|
||||||
|
|
||||||
ev->stats.triangles_evaluated++;
|
ev->stats.triangles_evaluated++;
|
||||||
|
|
||||||
|
double net_bps = (cumulative - 1.0) * 10000.0;
|
||||||
|
|
||||||
|
if (net_bps > ev->stats.best_net_bps) {
|
||||||
|
ev->stats.best_net_bps = net_bps;
|
||||||
|
snprintf(ev->stats.best_triangle_key, sizeof(ev->stats.best_triangle_key),
|
||||||
|
"%s/%s/%s", tri->base, tri->mid, tri->quote);
|
||||||
|
}
|
||||||
|
if (net_bps < ev->stats.worst_net_bps) ev->stats.worst_net_bps = net_bps;
|
||||||
|
|
||||||
int64_t now = now_ms();
|
int64_t now = now_ms();
|
||||||
if (now - last_status_ms >= 30000) {
|
if (now - last_status_ms >= 30000) {
|
||||||
last_status_ms = now;
|
last_status_ms = now;
|
||||||
|
|
@ -161,8 +170,6 @@ bool evaluate_symbol(evaluator_t *ev, uint16_t symbol_idx, int64_t t_sock_arrive
|
||||||
tris->triangle_count);
|
tris->triangle_count);
|
||||||
}
|
}
|
||||||
|
|
||||||
double net_bps = (cumulative - 1.0) * 10000.0;
|
|
||||||
|
|
||||||
if (net_bps <= cfg->signal_threshold_bps) {
|
if (net_bps <= cfg->signal_threshold_bps) {
|
||||||
ev->stats.triangles_skipped++;
|
ev->stats.triangles_skipped++;
|
||||||
continue;
|
continue;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue