Flent-users discussion archives
 help / color / mirror / Atom feed
From: Shashank D <notifications@github.com>
To: tohojo/flent <flent@noreply.github.com>
Cc: Subscribed <subscribed@noreply.github.com>
Subject: [Flent-users] Re: [tohojo/flent] ss_iterate.sh unnecessarily runs  for a long time (#236)
Date: Tue, 14 Sep 2021 00:38:19 -0700	[thread overview]
Message-ID: <tohojo/flent/issues/236/918892985@github.com> (raw)
In-Reply-To: <tohojo/flent/issues/236@github.com>

[-- Attachment #1: Type: text/plain, Size: 1416 bytes --]

> Hmm, good question. So you're just running ss in a busy loop, or did you keep the 'sleep'? If so, that seems a bit excessive to do by default. 
Yes I did keep the sleep in the loop. Here's the full loop:
```bash
command_string=$(cat <<EOF
duration="$(echo "$count*$interval" | bc) sec";
endtime=\$(date -d "\$duration" +%s%N);
while (( \$(date +%s%N) <= \$endtime )); do
    ss -t -i -p -n state connected "dst $target $filter"
    echo ''
    date '+Time: %s.%N';
    echo "---";
    sleep $interval || exit 1;
done
EOF
)
```
> I'd be a bit surprised if you could get this short a polling time out of the shell script, actually; what interval were you able to achieve?
Each iteration of this loop takes almost the same time as with the current implementation in flent. So this doesn't really help to set smaller `step-size`. But the total time of all iterations will be closer to the expected test duration set by the user. 

https://github.com/tohojo/flent/blob/9378031415f9d87b2ef500d082f4720abcec52da/flent/runners.py#L1978-L1979

Here, I feel that the calculated count is a bit excessive and keeps the loop running for much longer than the set test duration. Using end time calculations in the loop will solve this issue


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/tohojo/flent/issues/236#issuecomment-918892985

[-- Attachment #2: Type: text/html, Size: 3671 bytes --]

  parent reply	other threads:[~2021-09-14  7:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-08 16:18 [Flent-users] " Shashank D
2021-09-13 11:48 ` [Flent-users] " Toke Høiland-Jørgensen
2021-09-14  7:38 ` Shashank D [this message]
2021-09-14 10:46 ` Toke Høiland-Jørgensen
2021-09-14 16:14 ` Shashank D
2021-09-14 20:46 ` Toke Høiland-Jørgensen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.flent.org/postorius/lists/flent-users.flent.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tohojo/flent/issues/236/918892985@github.com \
    --to=notifications@github.com \
    --cc=flent@noreply.github.com \
    --cc=reply+AHVNJP5NLSRIMM7YRV6V4E57JQZGXEVBNHHDWFR3SE@reply.github.com \
    --cc=subscribed@noreply.github.com \
    --subject='[Flent-users] Re: [tohojo/flent] ss_iterate.sh unnecessarily runs  for a long time (#236)' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox