Skip to content

query rpc tracker - sort servers by key name#10641

Merged
kparzysz-quic merged 2 commits intoapache:mainfrom
pfk-beta:query_rpc_tracker_sorted
Mar 16, 2022
Merged

query rpc tracker - sort servers by key name#10641
kparzysz-quic merged 2 commits intoapache:mainfrom
pfk-beta:query_rpc_tracker_sorted

Conversation

@pfk-beta
Copy link
Contributor

Hello,

I have created simple PR, currenly when I have multiple RPC server I can see then in random order, another issue is that ip address can have different length, e.g. 1.1.1.1 is 7, and 255.255.255.255 is 15, so the output may looks like:

Server List
----------------------------
server-address     key
----------------------------
172.31.8.8:5001 server:prague
172.31.8.3:5001 server:plex
172.31.8.12:5001        server:plex
172.31.8.4:5001 server:prague
172.31.8.13:5001        server:plex
172.31.8.5:5001 server:prague
172.31.8.13:5001        server:plex
----------------------------

after my changes:

Server List
------------------------------
server-address           key
------------------------------
     172.31.8.12:5001    server:plex
      172.31.8.3:5001    server:plex
     172.31.8.13:5001    server:plex
     172.31.8.13:5001    server:plex
      172.31.8.8:5001    server:prague
      172.31.8.4:5001    server:prague
      172.31.8.5:5001    server:prague
------------------------------

@pfk-beta
Copy link
Contributor Author

another issue, when I review client code, is that total_ct can be converted to defaultdict(int), and computing max_key_len can be shortened to if-condition-assignment

@kparzysz-quic kparzysz-quic merged commit 02d1539 into apache:main Mar 16, 2022
pfk-beta added a commit to pfk-beta/tvm that referenced this pull request Apr 11, 2022
* query rpc tracker - sort servers by key name

* fix black formating

Co-authored-by: pfk-beta <this_email_isnot_working@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments