Skip to content

Feature/measure ram cpu - #1

Open
LuxoftAKutsan wants to merge 13 commits into
developfrom
feature/measure_ram_cpu
Open

Feature/measure ram cpu#1
LuxoftAKutsan wants to merge 13 commits into
developfrom
feature/measure_ram_cpu

Conversation

@LuxoftAKutsan

Copy link
Copy Markdown

Add docker for remote adapter server
Fix compilation for raspberry pi
Add support of execution remote background tasks
Add python script that collects ram\cpu statistics of SDL
Scripts: #1

MNikora and others added 3 commits April 27, 2020 14:09
@@ -0,0 +1 @@
docker build . -t remote_atf_server

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@LuxoftAKutsan I would propose to add next line to script

#!/bin/bash

ip addr | grep -E "inet " | tr -s " " | cut -d ' ' -f 3| cut -d '/' -f 1

echo " ls /home/developer "
ls /home/developer

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@LuxoftAKutsan What is purpose to display this list of files on start?

CPUS=2
docker rm $CONTAINER_NAME

echo $1 $2 $3

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@LuxoftAKutsan I would propose to add some description to these variables or do not display them at all.

std::pair<std::string, int>
ExecuteCommandBg(const std::string &bash_command);


Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@LuxoftAKutsan Please remove the redundant empty line.

Comment thread tools/measure_sdl.sh
@@ -0,0 +1,63 @@
#!/usr/bin/env bash

# apt-get install sysstat linux-tools-common

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@LuxoftAKutsan Could this commented instruction be removed from the script?

Comment thread tools/measure_sdl.sh
}

function measure_docker() {
RECORD=$(docker stats --format "{{.Name}} {{.CPUPerc}} {{.MemUsage}} {{.PIDs}}" --no-stream | grep $CONTAINTER_NAME)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@LuxoftAKutsan This line too long and contains redundant whitespaces. Could it be fixed?

Comment thread tools/sdl_graphs.py

def parse_ps(line):
# time + ps --no-headers --format "start %cpu cp cputime %mem sz thcount"
line = line.split()

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@LuxoftAKutsan I would propose to avoid storing different types of data into one variable.
line = line.split() => single string -> collection of strings

Comment thread tools/sdl_graphs.py
record["thcount"] = int(line[7])
return record

def sdl_start_time_docker(lines):

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@LuxoftAKutsan Function name does not describe what it actually do, for my opinion. Could it be renamed to fit more precisely?

This comment relates to other functions of this PR too.

Comment thread tools/sdl_graphs.py
plt.ylabel(ylable)
plt.xlabel(xlable)
plt.savefig("{}_{}.png".format(file_pattern, ylable), format='png')
# plt.show()

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@LuxoftAKutsan I would propose to remove commented code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants