Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Actor Framework
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
Actor Framework
Commits
f63e2510
Commit
f63e2510
authored
Jun 20, 2018
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Integrate work-stealing options into new framework
parent
8d95e859
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
19 deletions
+25
-19
libcaf_core/src/actor_system_config.cpp
libcaf_core/src/actor_system_config.cpp
+25
-19
No files found.
libcaf_core/src/actor_system_config.cpp
View file @
f63e2510
...
@@ -65,13 +65,17 @@ actor_system_config::actor_system_config()
...
@@ -65,13 +65,17 @@ actor_system_config::actor_system_config()
scheduler_max_throughput
=
std
::
numeric_limits
<
size_t
>::
max
();
scheduler_max_throughput
=
std
::
numeric_limits
<
size_t
>::
max
();
scheduler_enable_profiling
=
false
;
scheduler_enable_profiling
=
false
;
scheduler_profiling_ms_resolution
=
100
;
scheduler_profiling_ms_resolution
=
100
;
work_stealing_aggressive_poll_attempts
=
100
;
namespace
ws
=
defaults
::
work_stealing
;
work_stealing_aggressive_steal_interval
=
10
;
auto
to_us
=
[](
timespan
x
)
{
work_stealing_moderate_poll_attempts
=
500
;
return
static_cast
<
size_t
>
(
x
.
count
()
/
1000
);
work_stealing_moderate_steal_interval
=
5
;
};
work_stealing_moderate_sleep_duration_us
=
50
;
work_stealing_aggressive_poll_attempts
=
ws
::
aggressive_poll_attempts
;
work_stealing_relaxed_steal_interval
=
1
;
work_stealing_aggressive_steal_interval
=
ws
::
aggressive_steal_interval
;
work_stealing_relaxed_sleep_duration_us
=
10000
;
work_stealing_moderate_poll_attempts
=
ws
::
moderate_poll_attempts
;
work_stealing_moderate_steal_interval
=
ws
::
moderate_steal_interval
;
work_stealing_moderate_sleep_duration_us
=
to_us
(
ws
::
moderate_sleep_duration
);
work_stealing_relaxed_steal_interval
=
ws
::
relaxed_steal_interval
;
work_stealing_relaxed_sleep_duration_us
=
to_us
(
ws
::
relaxed_sleep_duration
);
logger_file_name
=
"actor_log_[PID]_[TIMESTAMP]_[NODE].log"
;
logger_file_name
=
"actor_log_[PID]_[TIMESTAMP]_[NODE].log"
;
logger_file_format
=
"%r %c %p %a %t %C %M %F:%L %m%n"
;
logger_file_format
=
"%r %c %p %a %t %C %M %F:%L %m%n"
;
logger_console
=
atom
(
"none"
);
logger_console
=
atom
(
"none"
);
...
@@ -88,9 +92,8 @@ actor_system_config::actor_system_config()
...
@@ -88,9 +92,8 @@ actor_system_config::actor_system_config()
middleman_max_pending_msgs
=
defaults
::
middleman
::
max_pending_msgs
;
middleman_max_pending_msgs
=
defaults
::
middleman
::
max_pending_msgs
;
// fill our options vector for creating INI and CLI parsers
// fill our options vector for creating INI and CLI parsers
opt_group
{
custom_options_
,
"global"
}
opt_group
{
custom_options_
,
"global"
}
.
add
<
bool
>
(
cli_helptext_printed
,
"help,h?"
,
"print help and exit"
)
.
add
<
bool
>
(
"help,h?"
,
"print help and exit"
)
.
add
<
bool
>
(
cli_helptext_printed
,
"long-help"
,
.
add
<
bool
>
(
"long-help"
,
"print all help options and exit"
)
"print all help options and exit"
)
.
add
<
bool
>
(
"dump-config"
,
"print configuration in INI format and exit"
);
.
add
<
bool
>
(
"dump-config"
,
"print configuration in INI format and exit"
);
opt_group
{
custom_options_
,
"streaming"
}
opt_group
{
custom_options_
,
"streaming"
}
.
add
(
streaming_desired_batch_complexity_us
,
"desired-batch-complexity-us"
,
.
add
(
streaming_desired_batch_complexity_us
,
"desired-batch-complexity-us"
,
...
@@ -114,19 +117,19 @@ actor_system_config::actor_system_config()
...
@@ -114,19 +117,19 @@ actor_system_config::actor_system_config()
"sets the output file for the profiler"
);
"sets the output file for the profiler"
);
opt_group
(
custom_options_
,
"work-stealing"
)
opt_group
(
custom_options_
,
"work-stealing"
)
.
add
(
work_stealing_aggressive_poll_attempts
,
"aggressive-poll-attempts"
,
.
add
(
work_stealing_aggressive_poll_attempts
,
"aggressive-poll-attempts"
,
"
sets the
number of zero-sleep-interval polling attempts"
)
"number of zero-sleep-interval polling attempts"
)
.
add
(
work_stealing_aggressive_steal_interval
,
"aggressive-steal-interval"
,
.
add
(
work_stealing_aggressive_steal_interval
,
"aggressive-steal-interval"
,
"
sets the
frequency of steal attempts during aggressive polling"
)
"frequency of steal attempts during aggressive polling"
)
.
add
(
work_stealing_moderate_poll_attempts
,
"moderate-poll-attempts"
,
.
add
(
work_stealing_moderate_poll_attempts
,
"moderate-poll-attempts"
,
"
sets the
number of moderately aggressive polling attempts"
)
"number of moderately aggressive polling attempts"
)
.
add
(
work_stealing_moderate_steal_interval
,
"moderate-steal-interval"
,
.
add
(
work_stealing_moderate_steal_interval
,
"moderate-steal-interval"
,
"
sets the
frequency of steal attempts during moderate polling"
)
"frequency of steal attempts during moderate polling"
)
.
add
(
work_stealing_moderate_sleep_duration_us
,
"moderate-sleep-duration"
,
.
add
_us
(
work_stealing_moderate_sleep_duration_us
,
"moderate-sleep-duration"
,
"sets the sleep interval
between poll attempts during moderate polling"
)
"sleep duration
between poll attempts during moderate polling"
)
.
add
(
work_stealing_relaxed_steal_interval
,
"relaxed-steal-interval"
,
.
add
(
work_stealing_relaxed_steal_interval
,
"relaxed-steal-interval"
,
"
sets the
frequency of steal attempts during relaxed polling"
)
"frequency of steal attempts during relaxed polling"
)
.
add
(
work_stealing_relaxed_sleep_duration_us
,
"relaxed-sleep-duration"
,
.
add
_us
(
work_stealing_relaxed_sleep_duration_us
,
"relaxed-sleep-duration"
,
"sets the sleep interval
between poll attempts during relaxed polling"
);
"sleep duration
between poll attempts during relaxed polling"
);
opt_group
{
custom_options_
,
"logger"
}
opt_group
{
custom_options_
,
"logger"
}
.
add
(
logger_file_name
,
"file-name"
,
.
add
(
logger_file_name
,
"file-name"
,
"sets the filesystem path of the log file"
)
"sets the filesystem path of the log file"
)
...
@@ -304,6 +307,9 @@ actor_system_config& actor_system_config::parse(string_list args,
...
@@ -304,6 +307,9 @@ actor_system_config& actor_system_config::parse(string_list args,
make_move_iterator
(
args
.
end
()));
make_move_iterator
(
args
.
end
()));
args_remainder
=
message_builder
{
remainder
.
begin
(),
remainder
.
end
()}
args_remainder
=
message_builder
{
remainder
.
begin
(),
remainder
.
end
()}
.
move_to_message
();
.
move_to_message
();
}
else
{
cli_helptext_printed
=
get_or
(
content
,
"global.help"
,
false
)
||
get_or
(
content
,
"global.long-help"
,
false
);
}
}
// Generate help text if needed.
// Generate help text if needed.
if
(
cli_helptext_printed
)
{
if
(
cli_helptext_printed
)
{
...
...
Write
Preview
Markdown
is supported
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