You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@slider.apache.org by go...@apache.org on 2015/10/23 21:04:36 UTC
incubator-slider git commit: SLIDER-852 Included ChaosMonkey logging
always print probability=0 (Sherry Guo via gourksaha)
Repository: incubator-slider
Updated Branches:
refs/heads/develop 2c82985f0 -> 94b26104d
SLIDER-852 Included ChaosMonkey logging always print probability=0 (Sherry Guo via gourksaha)
Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/94b26104
Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/94b26104
Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/94b26104
Branch: refs/heads/develop
Commit: 94b26104df96914858c7f149d5d9bb7c1d9fe8ac
Parents: 2c82985
Author: Gour Saha <go...@apache.org>
Authored: Fri Oct 23 12:03:47 2015 -0700
Committer: Gour Saha <go...@apache.org>
Committed: Fri Oct 23 12:03:47 2015 -0700
----------------------------------------------------------------------
.../apache/slider/server/appmaster/monkey/ChaosMonkeyService.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/94b26104/slider-core/src/main/java/org/apache/slider/server/appmaster/monkey/ChaosMonkeyService.java
----------------------------------------------------------------------
diff --git a/slider-core/src/main/java/org/apache/slider/server/appmaster/monkey/ChaosMonkeyService.java b/slider-core/src/main/java/org/apache/slider/server/appmaster/monkey/ChaosMonkeyService.java
index 27219e4..8948f0d 100644
--- a/slider-core/src/main/java/org/apache/slider/server/appmaster/monkey/ChaosMonkeyService.java
+++ b/slider-core/src/main/java/org/apache/slider/server/appmaster/monkey/ChaosMonkeyService.java
@@ -60,7 +60,8 @@ public class ChaosMonkeyService extends AbstractService {
public synchronized void addTarget(String name,
ChaosTarget target, long probability) {
if (probability > 0) {
- log.info("Adding {} with probability {}", name, probability / InternalKeys.PROBABILITY_PERCENT_1);
+ log.info("Adding {} with probability {}", name,
+ ((double)probability) / InternalKeys.PROBABILITY_PERCENT_1);
chaosEntries.add(new ChaosEntry(name, target, probability, metrics));
} else {
log.debug("Action {} not enabled", name);