From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-23.smtp.github.com (out-23.smtp.github.com [192.30.252.206]) by mail.toke.dk (Postfix) with ESMTPS id 82AF68CF802 for ; Wed, 13 Oct 2021 15:28:00 +0200 (CEST) Authentication-Results: mail.toke.dk; dkim=pass (1024-bit key) header.d=github.com header.i=@github.com header.b=ceu7CXtk Received: from github-lowworker-f373a82.va3-iad.github.net (github-lowworker-f373a82.va3-iad.github.net [10.48.114.27]) by smtp.github.com (Postfix) with ESMTP id BBDFF6007F7 for ; Wed, 13 Oct 2021 06:27:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=github.com; s=pf2014; t=1634131679; bh=gDROsp3jYkj75qmDrFMRwARiFJRDNvjGibkS0g39+K8=; h=Date:From:Reply-To:To:Cc:In-Reply-To:References:Subject:List-ID: List-Archive:List-Post:List-Unsubscribe:From; b=ceu7CXtk+NdFxSJfXuD3ZdF9Ddpy7IQuPJhXzmbqABPTZjZMhS5im7g+B+dzLM8cm YpzaqxVhz5cWBQFD1iC1eqmQyiXdxxhBZA+Z7Es0ZsF+McGj5Zl8EpYjjEeQ04WZY8 Vr/RqsIJ1iahkHNNWIRVaEyK83htINPXiF5KCqPc= Date: Wed, 13 Oct 2021 06:27:59 -0700 From: =?UTF-8?B?VG9rZSBIw7hpbGFuZC1Kw7hyZ2Vuc2Vu?= To: tohojo/flent Message-ID: In-Reply-To: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="--==_mimepart_6166dedfad719_5c93c7102117c2"; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: list X-GitHub-Sender: tohojo X-GitHub-Recipient: flent-users X-GitHub-Reason: subscribed X-Auto-Response-Suppress: All X-GitHub-Recipient-Address: flent-users@flent.org Message-ID-Hash: HCLZARF3VH4UF523QBUZNGUQPVRVLF47 X-Message-ID-Hash: HCLZARF3VH4UF523QBUZNGUQPVRVLF47 X-MailFrom: noreply@github.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Subscribed X-Mailman-Version: 3.3.4 Reply-To: tohojo/flent Subject: [Flent-users] Re: [tohojo/flent] Runners: stop stats collection iterators after test-time is completed (#237) List-Id: Flent discussion list Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: ----==_mimepart_6166dedfad719_5c93c7102117c2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit @tohojo requested changes on this pull request. Unfortunately this approach doesn't work on openwrt; but then the existing timestamped output doesn't either, we need to use the tc_iterate C program on there anyway. So maybe that's okay, and since the binary uses a timerfd, maybe we don't even need to switch that over to using 'length' either (since the 'count' should be accurate enough when the kernel runs the timer). Some comments on the code below... > } while getopts "c:I:H:t:p:f:" opt; do case $opt in - c) count="$OPTARG" ;; + l) length="$OPTARG" ;; You also need to change the opts string passed to getopts (`c:` to `l:`) > @@ -10,6 +12,7 @@ while getopts "i:c:I:C:H:" opt; do case $opt in i) interface=$OPTARG ;; c) count=$OPTARG ;; + l) length=$OPTARG ;; Same thing as above re: changing the optstring, also here you're not removing the `count` option... > @@ -1,7 +1,9 @@ #!/bin/bash +# set -x Leftover debug setting? > @@ -41,7 +41,8 @@ then fi command_string=$(cat < @@ -22,7 +25,8 @@ buffer="" command_string=$(cat </dev/null && exec tc_iterate $buffer -i $interface -c $count -I $interval -C $command; -for i in \$(seq $count); do +endtime=\$(date -d "\$length sec" +%s%N); As above > @@ -10,6 +12,7 @@ while getopts "i:c:I:C:H:" opt; do case $opt in i) interface=$OPTARG ;; c) count=$OPTARG ;; + l) length=$OPTARG ;; Ah, you're still passing `-c` to the C binary. Guess that should be changed as well to support the `-l` option. Which means we'll need to detect if it understands it; ugh... -- 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/pull/237#pullrequestreview-778537436 ----==_mimepart_6166dedfad719_5c93c7102117c2 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit

@tohojo requested changes on this pull request.

Unfortunately this approach doesn't work on openwrt; but then the existing timestamped output doesn't either, we need to use the tc_iterate C program on there anyway. So maybe that's okay, and since the binary uses a timerfd, maybe we don't even need to switch that over to using 'length' either (since the 'count' should be accurate enough when the kernel runs the timer).

Some comments on the code below...


In flent/scripts/ss_iterate.sh:

>  }
 
 while getopts "c:I:H:t:p:f:" opt; do
     case $opt in
-        c) count="$OPTARG" ;;
+        l) length="$OPTARG" ;;

You also need to change the opts string passed to getopts (c: to l:)


In flent/scripts/tc_iterate.sh:

> @@ -10,6 +12,7 @@ while getopts "i:c:I:C:H:" opt; do
     case $opt in
         i) interface=$OPTARG ;;
         c) count=$OPTARG ;;
+        l) length=$OPTARG ;;

Same thing as above re: changing the optstring, also here you're not removing the count option...


In flent/scripts/tc_iterate.sh:

> @@ -1,7 +1,9 @@
 #!/bin/bash
+# set -x

Leftover debug setting?


In flent/scripts/ss_iterate.sh:

> @@ -41,7 +41,8 @@ then
 fi
 
 command_string=$(cat <<EOF
-for i in \$(seq $count); do
+endtime=\$(date -d "\$length sec" +%s%N);

Here you shouldn't be escaping the $ - we want it evaluated while setting the command, not on the remote host.


In flent/scripts/tc_iterate.sh:

> @@ -22,7 +25,8 @@ buffer=""
 
 command_string=$(cat <<EOF
 which tc_iterate >/dev/null && exec tc_iterate $buffer -i $interface -c $count -I $interval -C $command;
-for i in \$(seq $count); do
+endtime=\$(date -d "\$length sec" +%s%N);

As above


In flent/scripts/tc_iterate.sh:

> @@ -10,6 +12,7 @@ while getopts "i:c:I:C:H:" opt; do
     case $opt in
         i) interface=$OPTARG ;;
         c) count=$OPTARG ;;
+        l) length=$OPTARG ;;

Ah, you're still passing -c to the C binary. Guess that should be changed as well to support the -l option. Which means we'll need to detect if it understands it; ugh...


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.

----==_mimepart_6166dedfad719_5c93c7102117c2--