public final class Utils extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_FLOW_CONTROL_WINDOW |
static long |
HISTOGRAM_MAX_VALUE |
static int |
HISTOGRAM_PRECISION |
| Modifier and Type | Method and Description |
|---|---|
static Messages.SimpleRequest |
makeRequest(Messages.PayloadType payloadType,
int reqLength,
int respLength)
Construct a
Messages.SimpleRequest with the specified dimensions. |
static Messages.SimpleResponse |
makeResponse(Messages.SimpleRequest request)
Construct a
Messages.SimpleResponse for the given request. |
static io.grpc.ManagedChannel |
newClientChannel(Transport transport,
String target,
boolean tls,
boolean testca,
String authorityOverride,
int flowControlWindow,
boolean directExecutor)
Create a
ManagedChannel for the given parameters. |
static boolean |
parseBoolean(String value) |
static SocketAddress |
parseServerSocketAddress(String value)
Parse a
SocketAddress from the given string. |
static int |
pickUnusedPort()
Picks a port that is not used right at this moment.
|
static void |
saveHistogram(org.HdrHistogram.Histogram histogram,
String filename)
Save a
Histogram to a file. |
public static final long HISTOGRAM_MAX_VALUE
public static final int HISTOGRAM_PRECISION
public static final int DEFAULT_FLOW_CONTROL_WINDOW
public static boolean parseBoolean(String value)
public static SocketAddress parseServerSocketAddress(String value)
SocketAddress from the given string.public static io.grpc.ManagedChannel newClientChannel(Transport transport, String target, boolean tls, boolean testca, @Nullable String authorityOverride, int flowControlWindow, boolean directExecutor)
ManagedChannel for the given parameters.public static void saveHistogram(org.HdrHistogram.Histogram histogram,
String filename)
throws IOException
Histogram to a file.IOExceptionpublic static Messages.SimpleResponse makeResponse(Messages.SimpleRequest request)
Messages.SimpleResponse for the given request.public static Messages.SimpleRequest makeRequest(Messages.PayloadType payloadType, int reqLength, int respLength)
Messages.SimpleRequest with the specified dimensions.public static int pickUnusedPort()