Obtaining socket stats for all other tests
hrishikeshathalye opened this issue · 3 comments
hrishikeshathalye commented
Can the code be changed in some way to obtain socket stats for tests other than tcp1up using the same SsRunner?
All the other runners inherit from ProcessRunner, so my guess is adding the code to detect the SOCKET_STATS option there will be the way to do it?
Something similar to the below lines of code in NetperfdemoRunner, but that can work for tests other than TCP_STREAM?
if args['test'] == 'TCP_STREAM' and self.settings.SOCKET_STATS:
self.add_child(SsRunner,
exclude_ports=(args['control_port'],),
delay=self.delay,
remote_host=None,
host=self.remote_host or 'localhost',
interval=args['interval'],
length=self.length,
target=self.host,
ip_version=args['ip_version'])
tohojo commented
Hrishikesh Athalye ***@***.***> writes:
Can the code be changed in some way to obtain socket stats for tests other than tcp1up using the same SsRunner?
All the other runners inherit from ProcessRunner, so my guess is adding the code to detect the SOCKET_STATS option there will be the way to do it?
Something similar to the below lines of code in NetperfdemoRunner, but that can work for tests other than TCP_STREAM?
What are you trying to achieve? The socket stats are captured from the
output of 'ss', which only carries the extended stats for TCP sockets...
hrishikeshathalye commented
I am trying to obtain stats for http-1up with a single worker and would like to have the stats for the underlying TCP socket that it uses
tohojo commented
Hrishikesh Athalye ***@***.***> writes:
I am trying to obtain stats for http-1up with a single worker and
would like to have the stats for the underlying TCP socket that it
uses
Right, so while that's doable, the socket stats won't show you that much
useful information for incoming flows - this is also the reason why it's
only enabled for TCP_STREAM flows in netperf.
As for adding the capability, I think the way to go about it would be to
move the add_child() call you quoted above into a helper function in
ProcessRunner, and have the child runners call that if the test they're
running is compatible with socket stats (i.e., TCP_STREAM tests for
netperf).