Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/measure ram cpu #1

Open
wants to merge 13 commits into
base: develop
Choose a base branch
from
Open

Conversation

LuxoftAKutsan
Copy link

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

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

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

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);


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.

@@ -0,0 +1,63 @@
#!/usr/bin/env bash

# apt-get install sysstat linux-tools-common

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?

}

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

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?


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

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

record["thcount"] = int(line[7])
return record

def sdl_start_time_docker(lines):

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.

plt.ylabel(ylable)
plt.xlabel(xlable)
plt.savefig("{}_{}.png".format(file_pattern, ylable), format='png')
# plt.show()

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