Class Util

java.lang.Object
io.hyperfoil.impl.Util

public class Util extends Object
  • Field Details

  • Method Details

    • compareIgnoreCase

      public static boolean compareIgnoreCase(byte b1, byte b2)
    • toLowerCase

      public static byte toLowerCase(byte b)
    • toUpperCase

      public static byte toUpperCase(byte b)
    • prettyPrintNanosFixed

      public static String prettyPrintNanosFixed(long timeNanos)
      Pretty prints timeNanos in 9 spaces
      Parameters:
      timeNanos - Time in nanoseconds.
      Returns:
      Formatted string.
    • prettyPrintNanos

      public static String prettyPrintNanos(long timeNanos, String width, boolean spaceBeforeUnit)
      Pretty prints time
      Parameters:
      timeNanos - Time in nanoseconds.
      width - Number of characters in the number, as string
      spaceBeforeUnit - Separate number and unit with a space.
      Returns:
      Formatted string.
    • prettyPrintNanos

      public static String prettyPrintNanos(long timeNanos)
    • toString

      public static String toString(io.netty.buffer.ByteBuf buf, int offset, int length)
    • isLatin

      public static boolean isLatin(CharSequence cs)
    • isAscii

      public static boolean isAscii(io.netty.buffer.ByteBuf cs, int offset, int len)
    • toAsciiString

      public static io.netty.util.AsciiString toAsciiString(io.netty.buffer.ByteBuf buf, int offset, int length)
    • string2byteBuf

      public static io.netty.buffer.ByteBuf string2byteBuf(CharSequence str, io.netty.buffer.ByteBuf buffer)
    • explainCauses

      public static String explainCauses(Throwable e)
    • regionMatchesIgnoreCase

      public static boolean regionMatchesIgnoreCase(CharSequence a, int aoffset, CharSequence b, int boffset, int length)
    • regionMatches

      public static boolean regionMatches(CharSequence a, int aoffset, CharSequence b, int boffset, int length)
    • startsWith

      public static boolean startsWith(CharSequence sequence, int offset, CharSequence prefix)
    • pow

      public static int pow(int base, int exp)
    • parseLong

      public static long parseLong(io.netty.buffer.ByteBuf data, int offset, int length)
    • isParamConvertible

      public static boolean isParamConvertible(Class<?> type)
    • prettyPrintObject

      public static String prettyPrintObject(Object value)
    • hasPrefix

      public static boolean hasPrefix(io.netty.buffer.ByteBuf data, int offset, int length, byte[] prefix)
    • serialize

      public static byte[] serialize(Benchmark benchmark) throws IOException
      Throws:
      IOException
    • deserialize

      public static Benchmark deserialize(byte[] bytes) throws IOException, ClassNotFoundException
      Throws:
      IOException
      ClassNotFoundException
    • toByteArray

      public static byte[] toByteArray(InputStream stream) throws IOException
      Throws:
      IOException
    • toString

      public static String toString(InputStream stream) throws IOException
      Throws:
      IOException
    • parseLong

      public static long parseLong(CharSequence string)
    • parseLong

      public static long parseLong(CharSequence string, int begin, int end)
    • parseLong

      public static long parseLong(CharSequence string, int begin, int end, long defaultValue)
    • parseToNanos

      public static long parseToNanos(String time)
    • parseToMillis

      public static long parseToMillis(String time)
    • daemonThreadFactory

      public static ThreadFactory daemonThreadFactory(String prefix)
    • urlEncode

      public static void urlEncode(String string, io.netty.buffer.ByteBuf buf)
    • prettyPrintData

      public static String prettyPrintData(double value)
    • intAsText2byteBuf

      public static void intAsText2byteBuf(int value, io.netty.buffer.ByteBuf buf)