hi, everyone, some lkp-tests's scripts is not our create, it is better not to modify them.
Thanks, Jihui
Reply-To: In-Reply-To: 20201125015157.2194483-1-2134782174@qq.com
On Wed, Nov 25, 2020 at 09:51:57AM +0800, Zhang Yu wrote:
Inspecting 1 file
iperf:19:86: C: Style/IfUnlessModifier: Modifier form of if makes the line too long. puts 'tcp.sender.bps: ' + obj['end']['streams'][0]['sender']['bits_per_second'].to_s if obj['end']['streams'][0]['sender'] ^^
iperf:20:90: C: Style/IfUnlessModifier: Modifier form of if makes the line too long. puts 'tcp.receiver.bps: ' + obj['end']['streams'][0]['receiver']['bits_per_second'].to_s if obj['end']['streams'][0]['receiver' ^^
Signed-off-by: Zhang Yu 2134782174@qq.com
stats/iperf | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/stats/iperf b/stats/iperf index b5c6c403..f2521db6 100755 --- a/stats/iperf +++ b/stats/iperf @@ -16,6 +16,12 @@ end
exit if obj['end'].empty?
-puts 'tcp.sender.bps: ' + obj['end']['streams'][0]['sender']['bits_per_second'].to_s if obj['end']['streams'][0]['sender'] -puts 'tcp.receiver.bps: ' + obj['end']['streams'][0]['receiver']['bits_per_second'].to_s if obj['end']['streams'][0]['receiver'] -puts 'udp.bps: ' + obj['end']['streams'][0]['udp']['bits_per_second'].to_s if obj['end']['streams'][0]['udp'] +if obj['end']['streams'][0]['sender']
- puts 'tcp.sender.bps: ' + obj['end']['streams'][0]['sender']['bits_per_second'].to_s
+end +if obj['end']['streams'][0]['receiver']
- puts 'tcp.receiver.bps: ' + obj['end']['streams'][0]['receiver']['bits_per_second'].to_s
+end +if obj['end']['streams'][0]['udp']
- puts 'udp.bps: ' + obj['end']['streams'][0]['udp']['bits_per_second'].to_s
+end
2.23.0