spdk_top: Fix thread idle and busy times sorting
Fixes github issue #1367 Signed-off-by: Maciej Szwed <maciej.szwed@intel.com> Change-Id: I639f94af0a61784cc1f3fe5bf9bbe7506bd39df6 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1999 Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Mellanox Build Bot
This commit is contained in:
parent
251a551aa3
commit
e0830eaab6
@ -792,12 +792,12 @@ sort_threads(const void *p1, const void *p2)
|
||||
count2 = thread_info2->paused_pollers_count;
|
||||
break;
|
||||
case 5: /* Sort by idle time */
|
||||
count1 = thread_info1->idle;
|
||||
count2 = thread_info2->idle;
|
||||
count1 = thread_info1->idle - thread_info1->last_idle;
|
||||
count2 = thread_info2->idle - thread_info2->last_idle;
|
||||
break;
|
||||
case 6: /* Sort by busy time */
|
||||
count1 = thread_info1->busy;
|
||||
count2 = thread_info2->busy;
|
||||
count1 = thread_info1->busy - thread_info1->last_busy;
|
||||
count2 = thread_info2->busy - thread_info2->last_busy;
|
||||
break;
|
||||
default:
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user