-
Notifications
You must be signed in to change notification settings - Fork 3k
Network Socket Statistics #8592
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
6ada95d
to
4cb10b9
Compare
4cb10b9
to
3fda1be
Compare
@deepikabhavnani, thank you for your changes. A review has been requested from the following: |
3fda1be
to
2c6377a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I cannot approve this design.
This is way too far away from what current Mbed OS statistics APIs are.
Only usable thing in this PR is the stack_stats_t
which contains packet counters.
If that is what have been requested, then we should have designed API similar to existing statistics APIS.
For example:
/** Network statistics */
typedef struct {
uint32_t pkt_xmit; /**< Transmitted packets. */
uint32_t pkt_recv; /**< Received packets. */
uint16_t sock_open; /**< Number of sockets opened */
} network_stats_t;
/** Get the network statistics */
void mbed_stats_network_get(network_stats_t *stats);
This would match the existing mbed_stats.h API.
I cannot understand why network statics have been done so overly complex way.
If the example proposal I just show is fine, it should have been asked from IP networking team to implement. If more complex statistics have been asked, then I'm not aware of the requirements and we should have started by creating a design that can be justified by the requirements document.
This is not the right forum to discuss this, but I would leave a comment stating design was shared nearly 3 months ago and numerous meetings request were made to discuss that as well |
@deepikabhavnani This needs a rebase. |
a254af5
to
7ff639f
Compare
@SeppoTakalo @lauri-piikivi @SenRamakri - Please review |
7ff639f
to
ef5031c
Compare
@ARMmbed/mbed-os-maintainers - Travis astyle failures related to trailing spaces, there is no clear indication for user that error is because of extra space.
|
93e5026
to
274f875
Compare
Error Resolved here is: SingletonPtr.h:93:13: error: ‘NULL’ was not declared in this scope
9c58a0d
to
2df0289
Compare
PR updated. Restarting CI. |
@deepikabhavnani Looks like there are still unittest issues. |
@cmonr - Fixed now.. Was able to test on linux machine |
Thanks @deepikabhavnani. CI restarted. |
@ARMmbed/mbed-os-maintainers - Please have a look Stopped the test run stuck from 4 hours. <1s |
/builds/ws/mbed-os-ci_mbed2-build-IAR/746/USENSE_IAR_746@tmp/durable-44ce7b4b: No space left on device |
Restarted jobs with failed results. Somehow, other jobs seem to not have been hit with the disk storage issue. Fingers crossed. |
Test run: SUCCESSSummary: 4 of 4 test jobs passed |
Description
This is the initial version of stats implementation in network layer.
SocketStats Class is added to collect and provide the statistics information. In this phase only socket information is collected and max sockets that can be recorded at any time are configurable through 'MBED_CONF_NSAPI_SOCKET_STATS_MAX_COUNT'
Network statistics can be enabled through a macro MBED_NW_STATS_ENABLED
More information on design is captured in #8743
Pull request type