The commands available to extract dialog information dlg.profile_list
and dlg.list
Are not fast enough to output a large amount of dialogs.
After doing some benchmark the time is spent in in rpc->struct_add
, rpc->add etc
, etc.
it appears to be slowing down linearly.
I made a quick POC to verify what I can get if I output to file instead and I got blazing fast performance, this is good news since it means that iterating over the hash table etc. is super fast.
dialog: outputing large amount of dialogs to file
Test:
1) injecting 100K dialogs with voip_perf
2) confirmation that we have 100K+ dialogs
kamcmd dlg.profile_get_size outbound_call
100879
3) execute the quickly hacked modifications to output to /tmp/dialogs.txt
kamctl rpc dlg.profile_list outbound_call
3.1) verify how long it took
2020-03-31T22:28:18.398916476Z 12(31) : dialog [dialog.c:2174]: internal_rpc_profile_print_dlgs(): profile->lock
2020-03-31T22:28:18.554379411Z 12(31) : dialog [dialog.c:2190]: internal_rpc_profile_print_dlgs(): profile->lock release
// command took less then 20ms
3.2) verify the content of the output
wc /tmp/dialogs.txt
124355 117324 20547037 /tmp/dialogs.txt
Note about the content
// not everything is outputed in this quick hack but we can imagine that the impact will be very low.
call-id[uV.YzlhIZd1inE8SYDAlzmOLG12tYqVS]from[sip:voip_perf@147.75.65.247]to[sip:12060412757@52.42.112.21]h_entry[6207]h_id[44579]ref[2]contact[sip:voip_perf@147.75.65.247:5072;transport=udp]cseq[19528]
I am thinking about adding commands to output to file in json
and/or csv
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.