Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
emper
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lehrstuhl für Informatik 4 (Systemsoftware)
manycore
emper
Merge requests
!371
[EchoServers] improve the callback based echoserver
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
[EchoServers] improve the callback based echoserver
aj46ezos/emper:improve-echoservers
into
master
Overview
0
Commits
1
Pipelines
2
Changes
2
Merged
Florian Fischer
requested to merge
aj46ezos/emper:improve-echoservers
into
master
3 years ago
Overview
0
Commits
1
Pipelines
2
Changes
2
Expand
Pass the IO results on the stack instead of storing them in the client object.
Terminate the runtime on quit to print stats.
Free Client objects.
0
0
Merge request reports
Compare
master
version 1
3d7d618f
3 years ago
master (base)
and
latest version
latest version
0bb7c145
1 commit,
3 years ago
version 1
3d7d618f
1 commit,
3 years ago
2 files
+
48
−
40
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
apps/EchoServer.cpp
+
3
−
1
Options
@@ -27,6 +27,8 @@ static const std::string HOST = "::";
static
const
std
::
string
PORT
=
"12345"
;
static
const
int
BACKLOG
=
1024
;
static
const
size_t
BUF_SIZE
=
1024
;
static
unsigned
int
computations_us
=
0
;
static
unsigned
int
max_computations_us
=
0
;
static
float
max_computations_probability
=
-
1
;
@@ -98,7 +100,7 @@ auto main(int argc, char* argv[]) -> int {
auto
serverFunc
=
[](
int
socket
)
{
// NOLINTNEXTLINE(modernize-avoid-c-arrays)
char
buf
[
1024
];
char
buf
[
BUF_SIZE
];
while
(
!
quit
.
load
(
std
::
memory_order_consume
))
{
ssize_t
bytes_recv
=
emper
::
io
::
recvAndWait
(
socket
,
buf
,
sizeof
(
buf
),
0
);
if
(
unlikely
(
bytes_recv
<=
0
))
{
Loading