Skip to content

Commit ee34e76

Browse files
thenevabrian-brazil
authored andcommitted
Seconds are 1000 milliseconds, not the other way around (#259)
1 parent 422e3b3 commit ee34e76

File tree

1 file changed

+3
-3
lines changed
  • simpleclient_pushgateway/src/main/java/io/prometheus/client/exporter

1 file changed

+3
-3
lines changed

simpleclient_pushgateway/src/main/java/io/prometheus/client/exporter/PushGateway.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
public class PushGateway {
5656

5757
private final String address;
58-
private static final int SECONDS_PER_MILLISECOND = 1000;
58+
private static final int MILLISECONDS_PER_SECOND = 1000;
5959
/**
6060
* Construct a Pushgateway, with the given address.
6161
* <p>
@@ -248,8 +248,8 @@ void doRequest(CollectorRegistry registry, String job, Map<String, String> group
248248
}
249249
connection.setRequestMethod(method);
250250

251-
connection.setConnectTimeout(10 * SECONDS_PER_MILLISECOND);
252-
connection.setReadTimeout(10 * SECONDS_PER_MILLISECOND);
251+
connection.setConnectTimeout(10 * MILLISECONDS_PER_SECOND);
252+
connection.setReadTimeout(10 * MILLISECONDS_PER_SECOND);
253253
connection.connect();
254254

255255
try {

0 commit comments

Comments
 (0)