From 8bda2043d7aabb9da4c90ccc7e5ba62d235ac6ef Mon Sep 17 00:00:00 2001 From: Piotr Sikora Date: Wed, 21 Dec 2011 12:35:36 +0000 Subject: When available, use VERSION defined in the environment. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index d46b4348..f3cd2774 100644 --- a/Makefile +++ b/Makefile @@ -56,7 +56,7 @@ endif #other args: +native +"{hipe,[o3,verbose]}" -Ddebug=true +debug_info +no_strict_record_tests ERLC_OPTS=-I $(INCLUDE_DIR) -o $(EBIN_DIR) -Wall -v +debug_info $(call boolean_macro,$(USE_SPECS),use_specs) $(call boolean_macro,$(USE_PROPER_QC),use_proper_qc) -VERSION=0.0.0 +VERSION?=0.0.0 PLUGINS_SRC_DIR?=$(shell [ -d "plugins-src" ] && echo "plugins-src" || echo ) PLUGINS_DIR=plugins TARBALL_NAME=rabbitmq-server-$(VERSION) -- cgit v1.2.1 From 3eef5a0aa82fa1645f1bfb196009269dcca0da9d Mon Sep 17 00:00:00 2001 From: Steve Powell Date: Fri, 23 Dec 2011 10:59:57 +0000 Subject: Added modification to portfile made on previous release by macports.org see https://trac.macports.org/changeset/87628 --- packaging/macports/Portfile.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packaging/macports/Portfile.in b/packaging/macports/Portfile.in index b6dad357..820197e7 100644 --- a/packaging/macports/Portfile.in +++ b/packaging/macports/Portfile.in @@ -60,6 +60,8 @@ use_configure no use_parallel_build yes +build.env-append HOME=${workpath} + destroot.target install_bin destroot.destdir \ -- cgit v1.2.1 From 67b1873a34f3794ae1c833a57d64c33e025bf49a Mon Sep 17 00:00:00 2001 From: Matthias Radestock Date: Wed, 4 Jan 2012 18:12:27 +0000 Subject: tiny refactor --- src/rabbit_memory_monitor.erl | 33 ++++++++++++++------------------- 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/src/rabbit_memory_monitor.erl b/src/rabbit_memory_monitor.erl index 02f3158f..b3b4b093 100644 --- a/src/rabbit_memory_monitor.erl +++ b/src/rabbit_memory_monitor.erl @@ -240,26 +240,21 @@ internal_update(State = #state { queue_durations = Durations, fun (Proc = #process { reported = QueueDuration, sent = PrevSendDuration, callback = {M, F, A} }, true) -> - case (case {QueueDuration, PrevSendDuration} of - {infinity, infinity} -> - true; - {infinity, D} -> - DesiredDurationAvg1 < D; - {D, infinity} -> - DesiredDurationAvg1 < D; - {D1, D2} -> - DesiredDurationAvg1 < - lists:min([D1,D2]) - end) of - true -> - ok = erlang:apply( - M, F, A ++ [DesiredDurationAvg1]), - ets:insert( - Durations, - Proc #process {sent = DesiredDurationAvg1}); - false -> - true + case should_send(QueueDuration, PrevSendDuration, + DesiredDurationAvg1) of + true -> ok = erlang:apply( + M, F, A ++ [DesiredDurationAvg1]), + ets:insert( + Durations, + Proc #process { + sent = DesiredDurationAvg1}); + false -> true end end, true, Durations) end, State1. + +should_send(infinity, infinity, _) -> true; +should_send(infinity, D, DD) -> DD < D; +should_send(D, infinity, DD) -> DD < D; +should_send(D1, D2, DD) -> DD < lists:min([D1, D2]). -- cgit v1.2.1 From 5c5ce28e1616c210ae9fbad9eed324c623de380c Mon Sep 17 00:00:00 2001 From: Matthias Radestock Date: Wed, 4 Jan 2012 18:50:59 +0000 Subject: another, even tinier, refactor --- src/rabbit_memory_monitor.erl | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/rabbit_memory_monitor.erl b/src/rabbit_memory_monitor.erl index b3b4b093..c25a177b 100644 --- a/src/rabbit_memory_monitor.erl +++ b/src/rabbit_memory_monitor.erl @@ -178,11 +178,8 @@ code_change(_OldVsn, State, _Extra) -> %% Internal functions %%---------------------------------------------------------------------------- -zero_clamp(Sum) -> - case Sum < ?EPSILON of - true -> 0.0; - false -> Sum - end. +zero_clamp(Sum) when Sum < ?EPSILON -> 0.0; +zero_clamp(Sum) -> Sum. internal_deregister(Pid, Demonitor, State = #state { queue_duration_sum = Sum, -- cgit v1.2.1