Spaces:
Running
Running
main - Sort worker cards by name instead of pid
Browse filesSorting by pid put the lettered names in an arbitrary, jumbled order on
screen (e.g. G, D, F, C...). Sort by name so cards read left-to-right as
A, B, C... regardless of the underlying pid order.
- similarity.py +1 -1
similarity.py
CHANGED
|
@@ -338,7 +338,7 @@ def get_dashboard_data():
|
|
| 338 |
if stats.get("evictions_per_min", 0) > _CACHE_THRASH_EVICTIONS_PER_MIN:
|
| 339 |
alerts.append(f"{name} cache a saturar (~{stats['evictions_per_min']:.0f} evicções/min)")
|
| 340 |
|
| 341 |
-
alive.sort(key=lambda s: s["pid"])
|
| 342 |
|
| 343 |
total_requests = sum(s.get("request_count_window", 0) for s in alive)
|
| 344 |
throughput_per_min = round(sum(s.get("throughput_per_min", 0) for s in alive), 1)
|
|
|
|
| 338 |
if stats.get("evictions_per_min", 0) > _CACHE_THRASH_EVICTIONS_PER_MIN:
|
| 339 |
alerts.append(f"{name} cache a saturar (~{stats['evictions_per_min']:.0f} evicções/min)")
|
| 340 |
|
| 341 |
+
alive.sort(key=lambda s: s.get("name") or str(s["pid"]))
|
| 342 |
|
| 343 |
total_requests = sum(s.get("request_count_window", 0) for s in alive)
|
| 344 |
throughput_per_min = round(sum(s.get("throughput_per_min", 0) for s in alive), 1)
|