Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update monitor with last version from freimairs repo #4685

Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
@Slf4j
public class AccountAgeWitnessStore extends PersistableNetworkPayloadStore<AccountAgeWitness> {

AccountAgeWitnessStore() {
public AccountAgeWitnessStore() {
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
@Slf4j
public class TradeStatistics3Store extends PersistableNetworkPayloadStore<TradeStatistics3> {

TradeStatistics3Store() {
public TradeStatistics3Store() {
}


Expand Down
8 changes: 5 additions & 3 deletions monitor/src/main/java/bisq/monitor/AvailableTor.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,15 @@

package bisq.monitor;

import java.io.File;
import org.berndpruenster.netlayer.tor.Tor;
import bisq.network.p2p.network.TorMode;

import org.berndpruenster.netlayer.tor.Tor;

import java.io.File;

/**
* This class uses an already defined Tor via <code>Tor.getDefault()</code>
*
*
* @author Florian Reimair
*
*/
Expand Down
8 changes: 4 additions & 4 deletions monitor/src/main/java/bisq/monitor/Metric.java
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,11 @@ public void run() {

// execute all the things
synchronized (this) {
log.info("{} started", getName());
execute();
log.info("{} done", getName());
log.info("{} started", getName());
execute();
log.info("{} done", getName());
}
} catch(Throwable e) {
} catch (Throwable e) {
log.error("A metric misbehaved!", e);
}
}
Expand Down
4 changes: 2 additions & 2 deletions monitor/src/main/java/bisq/monitor/OnionParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@

package bisq.monitor;

import bisq.network.p2p.NodeAddress;

import java.net.MalformedURLException;
import java.net.URL;

import bisq.network.p2p.NodeAddress;

/**
* Helper for parsing and pretty printing onion addresses.
*
Expand Down
6 changes: 5 additions & 1 deletion monitor/src/main/java/bisq/monitor/StatisticsHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,13 @@

package bisq.monitor;

import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.LongSummaryStatistics;
import java.util.Map;
import java.util.stream.Collectors;

/**
* Calculates average, max, min, p25, p50, p75 off of a list of samples and
Expand All @@ -31,7 +33,9 @@
*/
public class StatisticsHelper {

public static Map<String, String> process(List<Long> samples) {
public static Map<String, String> process(Collection<Long> input) {

List<Long> samples = input.stream().collect(Collectors.toList());

// aftermath
Collections.sort(samples);
Expand Down
2 changes: 1 addition & 1 deletion monitor/src/main/java/bisq/monitor/ThreadGate.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public void engage() {

/**
* Make everyone wait until the gate is open again.
*
*
* @param numberOfLocks how often the gate has to be unlocked until the gate
* opens.
*/
Expand Down
Loading