Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
OnGres Inc.
pgio
Commits
9e9d83aa
Commit
9e9d83aa
authored
Feb 12, 2019
by
Matteo Melli
Browse files
Fixed prometheus service exit without starting
parent
592f1e38
Changes
1
Hide whitespace changes
Inline
Side-by-side
main/src/main/java/com/ongres/pgio/main/Main.java
View file @
9e9d83aa
...
...
@@ -31,7 +31,6 @@ import com.ongres.pgio.main.stats.serializer.StatSerializer;
import
com.ongres.pgio.main.version.Version
;
import
fi.iki.elonen.NanoHTTPD
;
import
joptsimple.OptionException
;
import
joptsimple.OptionParser
;
import
joptsimple.OptionSet
;
...
...
@@ -48,6 +47,7 @@ import java.time.Duration;
import
java.time.Instant
;
import
java.util.Optional
;
import
java.util.Scanner
;
import
java.util.concurrent.TimeUnit
;
import
java.util.function.Consumer
;
import
java.util.function.Function
;
...
...
@@ -138,9 +138,12 @@ public class Main {
return
message
;
}
private
static
void
runPrometheusService
(
Config
config
)
throws
IO
Exception
{
private
static
void
runPrometheusService
(
Config
config
)
throws
Exception
{
PrometheusService
service
=
new
PrometheusService
(
config
);
service
.
start
(
NanoHTTPD
.
SOCKET_READ_TIMEOUT
,
false
);
while
(
true
)
{
TimeUnit
.
MICROSECONDS
.
sleep
(
20
);
}
}
private
static
void
runCollector
(
Config
config
)
throws
Exception
,
InterruptedException
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment