Merge pull request #13861 from rabbitmq/move-os_mon-users-back-to-rabbit
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Waiting to run
Details
Test (make) / Build and Xref (1.17, 26) (push) Waiting to run
Details
Test (make) / Build and Xref (1.17, 27) (push) Waiting to run
Details
Test (make) / Test (1.17, 27, khepri) (push) Waiting to run
Details
Test (make) / Test (1.17, 27, mnesia) (push) Waiting to run
Details
Test (make) / Test mixed clusters (1.17, 27, khepri) (push) Waiting to run
Details
Test (make) / Test mixed clusters (1.17, 27, mnesia) (push) Waiting to run
Details
Test (make) / Type check (1.17, 27) (push) Waiting to run
Details
Test Management UI with Selenium / selenium (chrome, 1.17.3, 27.3) (push) Waiting to run
Details
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Waiting to run
Details
Test (make) / Build and Xref (1.17, 26) (push) Waiting to run
Details
Test (make) / Build and Xref (1.17, 27) (push) Waiting to run
Details
Test (make) / Test (1.17, 27, khepri) (push) Waiting to run
Details
Test (make) / Test (1.17, 27, mnesia) (push) Waiting to run
Details
Test (make) / Test mixed clusters (1.17, 27, khepri) (push) Waiting to run
Details
Test (make) / Test mixed clusters (1.17, 27, mnesia) (push) Waiting to run
Details
Test (make) / Type check (1.17, 27) (push) Waiting to run
Details
Test Management UI with Selenium / selenium (chrome, 1.17.3, 27.3) (push) Waiting to run
Details
Move `file_handle_cache` and `vm_memory_monitor` back to `rabbit`
This commit is contained in:
commit
f50a8d39cc
|
@ -54,7 +54,7 @@
|
||||||
page_size = undefined,
|
page_size = undefined,
|
||||||
proc_file = undefined}).
|
proc_file = undefined}).
|
||||||
|
|
||||||
-include("rabbit_memory.hrl").
|
-include("include/rabbit_memory.hrl").
|
||||||
|
|
||||||
%%----------------------------------------------------------------------------
|
%%----------------------------------------------------------------------------
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
|
|
||||||
-include_lib("eunit/include/eunit.hrl").
|
-include_lib("eunit/include/eunit.hrl").
|
||||||
|
|
||||||
|
-include("include/rabbit_memory.hrl").
|
||||||
|
|
||||||
-compile(export_all).
|
-compile(export_all).
|
||||||
|
|
||||||
all() ->
|
all() ->
|
||||||
|
@ -22,7 +24,11 @@ groups() ->
|
||||||
parse_line_linux,
|
parse_line_linux,
|
||||||
set_vm_memory_high_watermark_relative1,
|
set_vm_memory_high_watermark_relative1,
|
||||||
set_vm_memory_high_watermark_relative2,
|
set_vm_memory_high_watermark_relative2,
|
||||||
set_vm_memory_high_watermark_absolute
|
set_vm_memory_high_watermark_absolute,
|
||||||
|
parse_mem_limit_relative_exactly_max,
|
||||||
|
parse_mem_relative_above_max,
|
||||||
|
parse_mem_relative_integer,
|
||||||
|
parse_mem_relative_invalid
|
||||||
]}
|
]}
|
||||||
].
|
].
|
||||||
|
|
||||||
|
@ -119,3 +125,43 @@ set_and_verify_vm_memory_high_watermark_absolute(MemLimit0) ->
|
||||||
ct:fail("Expected memory high watermark to be ~tp but it was ~tp", [Interpreted, MemLimit])
|
ct:fail("Expected memory high watermark to be ~tp but it was ~tp", [Interpreted, MemLimit])
|
||||||
end,
|
end,
|
||||||
vm_memory_monitor:set_vm_memory_high_watermark(0.6).
|
vm_memory_monitor:set_vm_memory_high_watermark(0.6).
|
||||||
|
|
||||||
|
parse_mem_limit_relative_exactly_max(_Config) ->
|
||||||
|
MemLimit = vm_memory_monitor:parse_mem_limit(1.0),
|
||||||
|
case MemLimit of
|
||||||
|
?MAX_VM_MEMORY_HIGH_WATERMARK -> ok;
|
||||||
|
_ -> ct:fail(
|
||||||
|
"Expected memory limit to be ~tp, but it was ~tp",
|
||||||
|
[?MAX_VM_MEMORY_HIGH_WATERMARK, MemLimit]
|
||||||
|
)
|
||||||
|
end.
|
||||||
|
|
||||||
|
parse_mem_relative_above_max(_Config) ->
|
||||||
|
MemLimit = vm_memory_monitor:parse_mem_limit(1.01),
|
||||||
|
case MemLimit of
|
||||||
|
?MAX_VM_MEMORY_HIGH_WATERMARK -> ok;
|
||||||
|
_ -> ct:fail(
|
||||||
|
"Expected memory limit to be ~tp, but it was ~tp",
|
||||||
|
[?MAX_VM_MEMORY_HIGH_WATERMARK, MemLimit]
|
||||||
|
)
|
||||||
|
end.
|
||||||
|
|
||||||
|
parse_mem_relative_integer(_Config) ->
|
||||||
|
MemLimit = vm_memory_monitor:parse_mem_limit(1),
|
||||||
|
case MemLimit of
|
||||||
|
?MAX_VM_MEMORY_HIGH_WATERMARK -> ok;
|
||||||
|
_ -> ct:fail(
|
||||||
|
"Expected memory limit to be ~tp, but it was ~tp",
|
||||||
|
[?MAX_VM_MEMORY_HIGH_WATERMARK, MemLimit]
|
||||||
|
)
|
||||||
|
end.
|
||||||
|
|
||||||
|
parse_mem_relative_invalid(_Config) ->
|
||||||
|
MemLimit = vm_memory_monitor:parse_mem_limit([255]),
|
||||||
|
case MemLimit of
|
||||||
|
?DEFAULT_VM_MEMORY_HIGH_WATERMARK -> ok;
|
||||||
|
_ -> ct:fail(
|
||||||
|
"Expected memory limit to be ~tp, but it was ~tp",
|
||||||
|
[?DEFAULT_VM_MEMORY_HIGH_WATERMARK, MemLimit]
|
||||||
|
)
|
||||||
|
end.
|
||||||
|
|
|
@ -25,7 +25,7 @@ define HEX_TARBALL_EXTRA_METADATA
|
||||||
}
|
}
|
||||||
endef
|
endef
|
||||||
|
|
||||||
LOCAL_DEPS = compiler crypto public_key sasl ssl syntax_tools tools xmerl os_mon runtime_tools
|
LOCAL_DEPS = compiler crypto public_key sasl ssl syntax_tools tools xmerl runtime_tools
|
||||||
DEPS = thoas ranch recon credentials_obfuscation
|
DEPS = thoas ranch recon credentials_obfuscation
|
||||||
|
|
||||||
# Variables and recipes in development.*.mk are meant to be used from
|
# Variables and recipes in development.*.mk are meant to be used from
|
||||||
|
|
|
@ -11,7 +11,6 @@
|
||||||
-include_lib("proper/include/proper.hrl").
|
-include_lib("proper/include/proper.hrl").
|
||||||
-include_lib("eunit/include/eunit.hrl").
|
-include_lib("eunit/include/eunit.hrl").
|
||||||
|
|
||||||
-include("rabbit_memory.hrl").
|
|
||||||
-include("rabbit.hrl").
|
-include("rabbit.hrl").
|
||||||
|
|
||||||
-compile(export_all).
|
-compile(export_all).
|
||||||
|
@ -26,7 +25,6 @@
|
||||||
all() ->
|
all() ->
|
||||||
[
|
[
|
||||||
{group, parallel_tests},
|
{group, parallel_tests},
|
||||||
{group, parse_mem_limit},
|
|
||||||
{group, gen_server2},
|
{group, gen_server2},
|
||||||
{group, date_time}
|
{group, date_time}
|
||||||
].
|
].
|
||||||
|
@ -53,12 +51,6 @@ groups() ->
|
||||||
get_erl_path,
|
get_erl_path,
|
||||||
hexify
|
hexify
|
||||||
]},
|
]},
|
||||||
{parse_mem_limit, [parallel], [
|
|
||||||
parse_mem_limit_relative_exactly_max,
|
|
||||||
parse_mem_relative_above_max,
|
|
||||||
parse_mem_relative_integer,
|
|
||||||
parse_mem_relative_invalid
|
|
||||||
]},
|
|
||||||
{gen_server2, [parallel], [
|
{gen_server2, [parallel], [
|
||||||
stats_timer_is_working,
|
stats_timer_is_working,
|
||||||
stats_timer_writes_gen_server2_metrics_if_core_metrics_ets_exists,
|
stats_timer_writes_gen_server2_metrics_if_core_metrics_ets_exists,
|
||||||
|
@ -254,46 +246,6 @@ gen_server2_stop(_) ->
|
||||||
?assertEqual({'EXIT', noproc}, (catch gen_server:stop(TestServer))),
|
?assertEqual({'EXIT', noproc}, (catch gen_server:stop(TestServer))),
|
||||||
ok.
|
ok.
|
||||||
|
|
||||||
parse_mem_limit_relative_exactly_max(_Config) ->
|
|
||||||
MemLimit = vm_memory_monitor:parse_mem_limit(1.0),
|
|
||||||
case MemLimit of
|
|
||||||
?MAX_VM_MEMORY_HIGH_WATERMARK -> ok;
|
|
||||||
_ -> ct:fail(
|
|
||||||
"Expected memory limit to be ~tp, but it was ~tp",
|
|
||||||
[?MAX_VM_MEMORY_HIGH_WATERMARK, MemLimit]
|
|
||||||
)
|
|
||||||
end.
|
|
||||||
|
|
||||||
parse_mem_relative_above_max(_Config) ->
|
|
||||||
MemLimit = vm_memory_monitor:parse_mem_limit(1.01),
|
|
||||||
case MemLimit of
|
|
||||||
?MAX_VM_MEMORY_HIGH_WATERMARK -> ok;
|
|
||||||
_ -> ct:fail(
|
|
||||||
"Expected memory limit to be ~tp, but it was ~tp",
|
|
||||||
[?MAX_VM_MEMORY_HIGH_WATERMARK, MemLimit]
|
|
||||||
)
|
|
||||||
end.
|
|
||||||
|
|
||||||
parse_mem_relative_integer(_Config) ->
|
|
||||||
MemLimit = vm_memory_monitor:parse_mem_limit(1),
|
|
||||||
case MemLimit of
|
|
||||||
?MAX_VM_MEMORY_HIGH_WATERMARK -> ok;
|
|
||||||
_ -> ct:fail(
|
|
||||||
"Expected memory limit to be ~tp, but it was ~tp",
|
|
||||||
[?MAX_VM_MEMORY_HIGH_WATERMARK, MemLimit]
|
|
||||||
)
|
|
||||||
end.
|
|
||||||
|
|
||||||
parse_mem_relative_invalid(_Config) ->
|
|
||||||
MemLimit = vm_memory_monitor:parse_mem_limit([255]),
|
|
||||||
case MemLimit of
|
|
||||||
?DEFAULT_VM_MEMORY_HIGH_WATERMARK -> ok;
|
|
||||||
_ -> ct:fail(
|
|
||||||
"Expected memory limit to be ~tp, but it was ~tp",
|
|
||||||
[?DEFAULT_VM_MEMORY_HIGH_WATERMARK, MemLimit]
|
|
||||||
)
|
|
||||||
end.
|
|
||||||
|
|
||||||
platform_and_version(_Config) ->
|
platform_and_version(_Config) ->
|
||||||
MajorVersion = erlang:system_info(otp_release),
|
MajorVersion = erlang:system_info(otp_release),
|
||||||
Result = rabbit_misc:platform_and_version(),
|
Result = rabbit_misc:platform_and_version(),
|
||||||
|
|
Loading…
Reference in New Issue