[OpenSER-Devel] [ openser-Patches-1907645 ] dialog: dialog profiling
SourceForge.net
noreply at sourceforge.net
Wed Mar 5 05:33:25 CET 2008
Patches item #1907645, was opened at 2008-03-04 23:33
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=743022&aid=1907645&group_id=139143
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: modules
Group: ver devel
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Ovidiu Sas (osas)
Assigned to: Nobody/Anonymous (nobody)
Summary: dialog: dialog profiling
Initial Comment:
Here is a patch for the dialog module that will allow dialog profiling. This new enhancement to the dialog module will keep track of the number of dialogs/calls per 'profile'.
How is it working?
Two new dialog params are available:
1. dlg_index_avp
2. profiling_table_size
The "profiling_table_size" parameter will define the maximum numbers of profiles. If a call needs to be accounted, the profile index shall be stored into the "dlg_index_avp" avp. If the "dlg_index_avp" is not set (i.e. NULL), the call will not be profiled.
A new pseudo variable is available for holding the number of dialogs/calls per profile: "DLG_profile".
In order to get the number of dialogs/calls associated to a profile, the profile id must be passed as an index to the "DLG_profile" PV. The index must follow into the [0,profiling_table_size range-1] range.
Config example:
modparam("dialog", "dlg_flag", 4)
modparam("dialog", "dlg_index_avp", "$avp(i:600)")
modparam("dialog", "profiling_table_size", 10)
...
/* print the number of calls for profile 2 */
xlog("L_INFO","$(DLG_profile[2])\n");
/* or */
$var(profiling) = 2;
xlog("L_INFO","$(DLG_profile[$var(profiling)])\n");
...
if (profiling) {
/* account the call into profile 2*/
$avp(i:600) = "2";
/* or */
$avp(i:600) = 2;
/* or */
$var(profiling) = 2;
$avp(i:600) = $var(profiling);
}
...
This patch is presented as a proof of concept and it is provided against current stable version of openser 1.3.
I would like to collect more feedbacks before proceeding with a full implementation for 1.4.
Bogdan, will this work for you? I know that you had something similar in your TODO list, so I would like to have your opinion about this patch and merge the efforts in order to get this asap in the gate.
Regards,
Ovidiu Sas
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=743022&aid=1907645&group_id=139143
More information about the Devel
mailing list