You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2020/01/09 06:04:39 UTC

[GitHub] [skywalking] aderm commented on a change in pull request #4203: improve TimeBucket class getTimeBucket method.

aderm commented on a change in pull request #4203: improve TimeBucket class getTimeBucket method.
URL: https://github.com/apache/skywalking/pull/4203#discussion_r364571201
 
 

 ##########
 File path: oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/TimeBucket.java
 ##########
 @@ -17,14 +17,18 @@
 
 package org.apache.skywalking.oap.server.core.analysis;
 
-import java.util.Calendar;
 import org.apache.skywalking.oap.server.core.UnexpectedException;
 
 /**
  * @author peng-yongsheng
  */
 public class TimeBucket {
 
+    public static final int SECOND_BUCKET = 60;
+    public static final int HOUR_BUCKET = 60 * 60;
+    public static final int DAY_BUCKET = 60 * 60 * 24;
+    public static final int MONTH_BUCKET = 60 * 60 * 24 * 30;
 
 Review comment:
   It ’s really a bit problematic for the month, but it ’s not currently used, but the day, hour, and minute should be fine.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services