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

Improve startup routines #4583

Merged
merged 25 commits into from Oct 1, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
b73fff0
Refactor: Move AsciiLogo to common
chimp1984 Oct 1, 2020
fe7ccbd
Refactor: extract method
chimp1984 Oct 1, 2020
b6e97e3
Refactor: add new setup method to CommonSetup with config (WIP) and c…
chimp1984 Oct 1, 2020
7ea3676
Refactor: Rename setup to setupUncaughtExceptionHandler
chimp1984 Oct 1, 2020
9232a57
Improve handling of UncaughtExceptionHandler
chimp1984 Oct 1, 2020
9d12bf7
Refactor: Move sig int handlers to CommonSetup
chimp1984 Oct 1, 2020
b927f97
Refactor: Move DevEnv setup to CommonSetup
chimp1984 Oct 1, 2020
516da22
Refactor: Add setup method in DevEnv
chimp1984 Oct 1, 2020
aa7315b
Refactor: Rename onUiReadyHandler to onApplicationStartedHandler
chimp1984 Oct 1, 2020
4f9a6ea
Refactor: Move periodic printSystemLoad to commonSetup
chimp1984 Oct 1, 2020
bb99eef
Refactor: Move AvoidStandbyModeService from BisqApp to BisqExecutable…
chimp1984 Oct 1, 2020
907fd66
Remove empty loop
chimp1984 Oct 1, 2020
fe577b3
Remove checkCryptoSetup as not needed anymore
chimp1984 Oct 1, 2020
4986650
Remove checkCryptoPolicySetup as not needed anymore
chimp1984 Oct 1, 2020
073f163
Remove Remove LimitedKeyStrengthException as not needed anymore
chimp1984 Oct 1, 2020
51ce37d
Refactor: Rearrange methods
chimp1984 Oct 1, 2020
a38f59a
Refactor: Move common bases setup code to CommonSetup
chimp1984 Oct 1, 2020
c3e1ae6
Remove cryptoSetupFailedHandler
chimp1984 Oct 1, 2020
346ad51
Refactor: Move osUserDataDir method to Utilities, rename to getUserDa…
chimp1984 Oct 1, 2020
11383b9
Refactor: Rename startAppSetup to runBisqSetup
chimp1984 Oct 1, 2020
6e7e975
Improve printSystemLoad
chimp1984 Oct 1, 2020
1b18886
Refactor: Move handler code to domain classes
chimp1984 Oct 1, 2020
a8a881e
Fix wrong printSystemLoad calls
chimp1984 Oct 1, 2020
ff13804
Merge branch 'master_upstream' into improve-startup-routines
chimp1984 Oct 1, 2020
d841222
Fix merge conflicts
chimp1984 Oct 1, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 0 additions & 3 deletions core/src/main/java/bisq/core/app/BisqHeadlessApp.java
Expand Up @@ -22,7 +22,6 @@
import bisq.common.UserThread;
import bisq.common.setup.GracefulShutDownHandler;
import bisq.common.storage.CorruptedDatabaseFilesHandler;
import bisq.common.util.Profiler;

import com.google.inject.Injector;

Expand Down Expand Up @@ -60,8 +59,6 @@ public void startApplication() {
tradeManager = injector.getInstance(TradeManager.class);

setupHandlers();

UserThread.runPeriodically(() -> Profiler.printSystemLoad(log), LOG_MEMORY_PERIOD_MIN, TimeUnit.MINUTES);
} catch (Throwable throwable) {
log.error("Error during app init", throwable);
handleUncaughtException(throwable, false);
Expand Down
Expand Up @@ -189,7 +189,7 @@ protected void keepRunning() {
protected void checkMemory(Config config, GracefulShutDownHandler gracefulShutDownHandler) {
int maxMemory = config.maxMemory;
UserThread.runPeriodically(() -> {
Profiler.printSystemLoad(log);
Profiler.printSystemLoad();
if (!stopped) {
long usedMemoryInMB = Profiler.getUsedMemoryInMB();
double warningTrigger = maxMemory * 0.8;
Expand All @@ -199,7 +199,7 @@ protected void checkMemory(Config config, GracefulShutDownHandler gracefulShutDo
"\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n\n",
(int) warningTrigger, usedMemoryInMB, Profiler.getFreeMemoryInMB());
System.gc();
Profiler.printSystemLoad(log);
Profiler.printSystemLoad();
}

UserThread.runAfter(() -> {
Expand Down