-
-
Notifications
You must be signed in to change notification settings - Fork 235
Collect network statistics and make it available for the user applications. #8310
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
New info items to query wire stats counters.
Why? |
This is an improvement. Shouldn't it to be applied to master branch only/first? |
To not pass wire stats items into the next layer that anyway have no idea about it. |
Usually - yes. But, formally, you are correct, I agree. |
I'd expect these stats (its server-side counterpart) to be also available in some new MON$ table. Not in v5 for sure. |
Agree |
This appears to be suspicious reason. It's pretty easy to remove remote provider specific items before sending info request to server. And as it was aslready mentioned merging two sets of info items is also simple task. So where is simplicity with suggested approach? |
As already said, this requirement was made to keep code simple. If you insist, I can add more complexity here. |
One loop through the request. For every local item fill the answer buffer and remove the item from the request. Then if request is not empty and answer buffer has some space - send request and append received answer to the answer buffer. I see no complexity here. |
Do you really think I don't know how to do it ?
Good for you. |
Requirement to not mix local and remote handled items in the same info request is removed. |
…tions. (#8310) * Make Remote provider collect wire statistics. New info items to query wire stats counters. * New ISQL commands to show wire statistics. * Remove requirement to not mix local and remote handled items in the same info request. * Follow @asfernandes suggestion about class members initialization. * Make ctor explicit, as @sim1984 suggested * Put isc_info_end into response buffer despite of its presence in info items.
|
WIll add it, thanks |
Done |
::: QA note ::: |
The feature makes Remote provider to collect various network statistics counters and let user applications to query it using
IAttachment::getInfo()
(isc_database_info()
) API.There are nine counters defined:
Counters with "in" and "out" in its names forms "logical IO" group and describes number of packets and bytes passed from the Firebird protocol point of view.
Counters with "snd" and "rcv" in its names forms "physical IO" group and describes number of packets and bytes passed over the physical connection. Also, there is
fb_info_wire_roundtrips
counter in "physical IO" group that shows how many times IO direction was changed from 'SEND' to 'RECEIVE'.If wire compression is active, values of physical bytes counters should be less than values of corresponding logical counters.
If wire compression is not active, both physical bytes counters and logical bytes counters should be equal.
While counters accumulated on both sides of the connection, only client side is available for client application:
it should be equal on both sides, except of opposite IO direction and
fb_info_wire_roundtrips
value,it requires no network rountdrip to query client side (i.e. local) counters.
For embedded connection: wire statistics is not exists and engine implementation of
IAttachment::getInfo()
doesn't handle wire stats items. It returnsisc_info_error
,isc_infunk
in the response for every wire stats item. It could be changed to return zero's, if necessary.isql utility got new commands to show wire statistics. It is described in doc\README.isql_enhancements.txt