类 Utils

java.lang.Object
com.github.myzhan.locust4j.utils.Utils

public class Utils extends Object
作者:
myzhan
  • 构造器详细资料

    • Utils

      public Utils()
  • 方法详细资料

    • md5

      public static String md5(String... inputs)
    • getHostname

      public static String getHostname()
    • getNodeID

      public static String getNodeID()
    • round

      public static long round(long value, int places)
    • now

      public static long now()
      Get the current timestamp in millis.
      返回:
      current timestamp in millis
    • currentTimeInSeconds

      public static long currentTimeInSeconds()
      Get the current timestamp in seconds.
      返回:
      current timestamp in seconds
    • getSystemEnvWithDefault

      public static String getSystemEnvWithDefault(String key, String defaultValue)
      Get environment variable by key, and return the default value if not found.
      返回:
      environment variable or the default valued