Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
LARN
PRRT
Commits
80a68c16
Commit
80a68c16
authored
Sep 28, 2018
by
Kai Vogelgesang
Browse files
Add gprof job to ci pipeline
parent
5ae2adab
Pipeline
#3072
failed with stages
in 1 minute and 40 seconds
Changes
3
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
80a68c16
...
...
@@ -79,3 +79,17 @@ deploy:pypi:
-
echo "password=$PYPI_PASSWORD" >> ~/.pypirc
-
python3 setup.py check sdist bdist upload -r on
-
rm -vf ~/.pypirc
deploy:profile:
stage
:
deploy
tags
:
-
gprof
script
:
-
CC=gcc-5 CXX=g++-5 cmake . -DGPROF=1
-
make
-
bash profiling/profile.sh
artifacts
:
paths
:
-
gprof-send.txt
-
gprof-recv.txt
expire_in
:
30 days
\ No newline at end of file
CMakeLists.txt
View file @
80a68c16
...
...
@@ -2,6 +2,7 @@ cmake_minimum_required (VERSION 2.8.11)
project
(
PRRT
)
option
(
PRRT_TESTS
"Build tests"
OFF
)
option
(
GPROF
"Compile with profiler"
OFF
)
set
(
CMAKE_ARCHIVE_OUTPUT_DIRECTORY
${
CMAKE_BINARY_DIR
}
)
set
(
CMAKE_LIBRARY_OUTPUT_DIRECTORY
${
CMAKE_BINARY_DIR
}
)
...
...
@@ -13,6 +14,10 @@ set(CMAKE_CXX_FLAGS "-fstack-protector -fstack-protector-all -Wall -std=gnu++11
set
(
CMAKE_CXX_FLAGS_DEBUG
"-O0 -Wall -ggdb -fsanitize=undefined -fsanitize=address -g3"
)
set
(
CMAKE_CXX_FLAGS_RELEASE
"-Os -Wall"
)
if
(
GPROF
)
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
-pg"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-pg"
)
endif
()
find_package
(
Threads
)
find_library
(
M_LIB m
)
...
...
profiling/profile.sh
0 → 100755
View file @
80a68c16
#!/usr/bin/env bash
which gprof
run_in
()
{
(
cd
$1
;
${
@
:2
}
)
}
to
=
"timeout -s INT 30 "
mkdir
-p
gprof_send gprof_recv
run_in gprof_recv
$to
../receiver
-p
5000
-r
127
-o
receiver.csv &
run_in gprof_send
$to
../sender
-t
127.0.0.1
-p
5000
-r
127
-o
sender.csv
wait
gprof ./receiver gprof_recv/gmon.out
>
gprof-recv.txt
gprof ./sender gprof_send/gmon.out
>
gprof-send.txt
rm
-r
gprof_send gprof_recv
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment