Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Performance von Anwendungen
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Saif Eddine Askri
Performance von Anwendungen
Commits
e643b1aa
Commit
e643b1aa
authored
2 months ago
by
Saif Eddine Askri
Browse files
Options
Downloads
Patches
Plain Diff
Update README and script for flame graph generation with output file name and frequency options
parent
83f9fd97
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
prak3/readme.md
+4
-11
4 additions, 11 deletions
prak3/readme.md
prak3/startServerAndCreateFlameGraph.sh
+18
-3
18 additions, 3 deletions
prak3/startServerAndCreateFlameGraph.sh
with
22 additions
and
14 deletions
prak3/readme.md
+
4
−
11
View file @
e643b1aa
...
...
@@ -53,21 +53,14 @@ The following scripts measure execution time and generate profiling data for dif
### 🔥 Stack Trace & Profiling (Perf + Flamegraphs)
-
**
With socket output:
**
-
**
Flame Graph for Server
**
```
sh
./stack_trace_with_perf.sh socket
```
-
**With pipe output:**
```
sh
./stack_trace_with_perf.sh pipe
```
-
**With shared_memory output:**
```
sh
./stack_trace_with_perf.sh shared_memory
./startServerAndCreateFlameGraph.sh serverFlameGraphFile 99
```
---
## 📊 Performance Analysis
These tests help analyze performance
differences when using sockets, pipes and shared memory.
These tests help analyze performance
of our server
Flamegraphs provide a visualization of CPU usage and execution bottlenecks. 🚀
This diff is collapsed.
Click to expand it.
prak3/startServerAndCreateFlameGraph.sh
+
18
−
3
View file @
e643b1aa
#!/bin/bash
FREQUENCY
=
$1
FREQUENCY
=
${
1
:-
99
}
# Check if the output file name is provided
if
[
-z
"
$1
"
]
;
then
echo
"Usage:
$0
<output file name> [frequency]"
exit
1
fi
# Assign the output file name
OUTPUT_FILE_NAME
=
$1
# Set the frequency (default to 99 if not provided)
FREQUENCY
=
${
2
:-
99
}
# Run perf record with the specified frequency
perf record
-g
-F
$FREQUENCY
./build/src/myserver
perf script | /usr/local/FlameGraph/stackcollapse-perf.pl | /usr/local/FlameGraph/flamegraph.pl
>
serverFlameGraph.svg
\ No newline at end of file
# Generate the flame graph
perf script | /usr/local/FlameGraph/stackcollapse-perf.pl | /usr/local/FlameGraph/flamegraph.pl
>
"
${
OUTPUT_FILE_NAME
}
.svg"
echo
"Flame graph saved to
${
OUTPUT_FILE_NAME
}
.svg"
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment