mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-23 15:00:30 +01:00
Adjust warn/alert tiggers
This commit is contained in:
parent
4f4f2c457b
commit
69b399780d
3 changed files with 13 additions and 8 deletions
|
@ -23,6 +23,11 @@ public class DeviationByPercentage implements DeviationType {
|
|||
private final double lowerWarnTrigger;
|
||||
private final double upperWarnTrigger;
|
||||
|
||||
// In case want to see the % deviation but not trigger any warnings or alerts
|
||||
public DeviationByPercentage() {
|
||||
this(0, Double.MAX_VALUE, 0, Double.MAX_VALUE);
|
||||
}
|
||||
|
||||
public DeviationByPercentage(double lowerAlertTrigger,
|
||||
double upperAlertTrigger,
|
||||
double lowerWarnTrigger,
|
||||
|
|
|
@ -71,10 +71,10 @@ public enum InventoryItem {
|
|||
// Should be very close values
|
||||
daoStateChainHeight("daoStateChainHeight",
|
||||
true,
|
||||
new DeviationByIntegerDiff(1, 3)),
|
||||
new DeviationByIntegerDiff(2, 4)),
|
||||
numBsqBlocks("numBsqBlocks",
|
||||
true,
|
||||
new DeviationByIntegerDiff(1, 3)),
|
||||
new DeviationByIntegerDiff(2, 4)),
|
||||
|
||||
// Has to be same values at same block
|
||||
daoStateHash("daoStateHash",
|
||||
|
@ -93,7 +93,7 @@ public enum InventoryItem {
|
|||
new DeviationByPercentage(0.33, 3, 0.4, 2.5)),
|
||||
numConnections("numConnections",
|
||||
true,
|
||||
new DeviationByPercentage(0.33, 3, 0.4, 2.5)),
|
||||
new DeviationByPercentage(0, Double.MAX_VALUE, 0.4, 2.5)),
|
||||
peakNumConnections("peakNumConnections",
|
||||
true,
|
||||
new DeviationByPercentage(0.33, 3, 0.4, 2.5)),
|
||||
|
@ -102,16 +102,16 @@ public enum InventoryItem {
|
|||
new DeviationByIntegerDiff(1, 2)),
|
||||
sentBytesPerSec("sentBytesPerSec",
|
||||
true,
|
||||
new DeviationByPercentage(0.33, 3, 0.4, 2.5)),
|
||||
new DeviationByPercentage()),
|
||||
receivedBytesPerSec("receivedBytesPerSec",
|
||||
true,
|
||||
new DeviationByPercentage(0.33, 3, 0.4, 2.5)),
|
||||
new DeviationByPercentage()),
|
||||
receivedMessagesPerSec("receivedMessagesPerSec",
|
||||
true,
|
||||
new DeviationByPercentage(0.33, 3, 0.4, 2.5)),
|
||||
new DeviationByPercentage()),
|
||||
sentMessagesPerSec("sentMessagesPerSec",
|
||||
true,
|
||||
new DeviationByPercentage(0.33, 3, 0.4, 2.5)),
|
||||
new DeviationByPercentage()),
|
||||
|
||||
// No deviation check
|
||||
sentBytes("sentBytes", true),
|
||||
|
|
|
@ -370,7 +370,7 @@ public class InventoryWebServer {
|
|||
}
|
||||
|
||||
if (!warningsAtRequestNumber.isEmpty()) {
|
||||
historicalWarnings = "Warnings at requests " + Joiner.on(" ").join(warningsAtRequestNumber);
|
||||
historicalWarnings = "Warnings at requests " + Joiner.on(", ").join(warningsAtRequestNumber);
|
||||
}
|
||||
if (!alertsAtRequestNumber.isEmpty()) {
|
||||
historicalAlerts = "Alerts at requests: " + Joiner.on(", ").join(alertsAtRequestNumber);
|
||||
|
|
Loading…
Add table
Reference in a new issue