Skip to content

Commit f181fe8

Browse files
committed
format
Signed-off-by: Gregor Zeitlinger <[email protected]>
1 parent 9777a91 commit f181fe8

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

prometheus-metrics-config/src/main/java/io/prometheus/metrics/config/ExporterProperties.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ static ExporterProperties load(Map<Object, Object> properties)
5050
throws PrometheusPropertiesException {
5151
Boolean includeCreatedTimestamps =
5252
Util.loadBoolean(PREFIX + "." + INCLUDE_CREATED_TIMESTAMPS, properties);
53-
Boolean timestampsInMs = Util.loadBoolean(PREFIX + "." + PROMETHEUS_TIMESTAMPS_IN_MS, properties);
53+
Boolean timestampsInMs =
54+
Util.loadBoolean(PREFIX + "." + PROMETHEUS_TIMESTAMPS_IN_MS, properties);
5455
Boolean exemplarsOnAllMetricTypes =
5556
Util.loadBoolean(PREFIX + "." + EXEMPLARS_ON_ALL_METRIC_TYPES, properties);
5657
return new ExporterProperties(

prometheus-metrics-config/src/test/java/io/prometheus/metrics/config/ExporterPropertiesTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ void builder() {
4848
ExporterProperties.builder()
4949
.includeCreatedTimestamps(true)
5050
.exemplarsOnAllMetricTypes(true)
51-
.prometheusTimestampsInMs(false)
51+
.prometheusTimestampsInMs(false)
5252
.build();
5353
assertThat(properties.getIncludeCreatedTimestamps()).isTrue();
5454
assertThat(properties.getExemplarsOnAllMetricTypes()).isTrue();

prometheus-metrics-exposition-textformats/src/test/java/io/prometheus/metrics/expositionformats/TextFormatUtilTest.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ private static String escape(String s) throws IOException {
2424
}
2525

2626
@Test
27-
void testWriteTimestamp() throws IOException {
28-
assertThat(writeTimestamp(true)).isEqualTo("1000");
29-
assertThat(writeTimestamp(false)).isEqualTo("1.000");
27+
void testWritePrometheusTimestamp() throws IOException {
28+
assertThat(writePrometheusTimestamp(true)).isEqualTo("1000");
29+
assertThat(writePrometheusTimestamp(false)).isEqualTo("1.000");
3030
}
3131

32-
private static String writeTimestamp(boolean timestampsInMs) throws IOException {
32+
private static String writePrometheusTimestamp(boolean timestampsInMs) throws IOException {
3333
StringWriter writer = new StringWriter();
3434
TextFormatUtil.writePrometheusTimestamp(writer, 1000, timestampsInMs);
3535
return writer.toString();

0 commit comments

Comments
 (0)