parent
467ef8bffc
commit
036aee8d2c
|
|
@ -26,7 +26,7 @@ public class TimeBucket {
|
|||
* Record time bucket format in Second Unit.
|
||||
*
|
||||
* @param time Timestamp
|
||||
* @return time in second format.
|
||||
* @return time in second format
|
||||
*/
|
||||
public static long getRecordTimeBucket(long time) {
|
||||
return getTimeBucket(time, Downsampling.Second);
|
||||
|
|
@ -36,7 +36,7 @@ public class TimeBucket {
|
|||
* Record time bucket format in Minute Unit.
|
||||
*
|
||||
* @param time Timestamp
|
||||
* @return time in minute format.
|
||||
* @return time in minute format
|
||||
*/
|
||||
public static long getMinuteTimeBucket(long time) {
|
||||
return getTimeBucket(time, Downsampling.Minute);
|
||||
|
|
@ -143,7 +143,7 @@ public class TimeBucket {
|
|||
*
|
||||
* @param time Timestamp
|
||||
* @param downsampling Downsampling
|
||||
* @return time in downsampling format.
|
||||
* @return time in downsampling format
|
||||
*/
|
||||
public static long getTimeBucket(long time, Downsampling downsampling) {
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ package org.apache.skywalking.oap.server.core.analysis.metrics;
|
|||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.apache.skywalking.oap.server.core.analysis.TimeBucket;
|
||||
import org.apache.skywalking.oap.server.core.remote.data.StreamData;
|
||||
import org.apache.skywalking.oap.server.core.storage.StorageData;
|
||||
import org.apache.skywalking.oap.server.core.storage.annotation.Column;
|
||||
|
|
@ -142,18 +143,15 @@ public abstract class Metrics extends StreamData implements StorageData {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* timeBucket in minute 201809120511 min 100000000000 max 999999999999
|
||||
*/
|
||||
private boolean isMinuteBucket() {
|
||||
return timeBucket < 999999999999L && timeBucket > 100000000000L;
|
||||
return TimeBucket.isMinuteBucket(timeBucket);
|
||||
}
|
||||
|
||||
private boolean isHourBucket() {
|
||||
return timeBucket < 9999999999L && timeBucket > 1000000000L;
|
||||
return TimeBucket.isHourBucket(timeBucket);
|
||||
}
|
||||
|
||||
private boolean isDayBucket() {
|
||||
return timeBucket < 99999999L && timeBucket > 10000000L;
|
||||
return TimeBucket.isDayBucket(timeBucket);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue