MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / strRand

Method strRand

serving/processor/tests/flatbuf_test/java/perf.java:51–61  ·  view source on GitHub ↗
(int len)

Source from the content-addressed store, hash-verified

49 static int TESTING_COUNT = 100;
50
51 public static String strRand(int len) {
52 String str = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
53 Random random = new Random();
54 StringBuffer sb = new StringBuffer();
55 for(int i = 0; i < len; i++) {
56 int number = random.nextInt(62);
57 sb.append(str.charAt(number));
58 }
59
60 return sb.toString();
61 }
62
63 public static void prepareData(String sigName, String[] inputNames,
64 int[] dataTypes, long[][] shapes,

Callers 1

prepareDataMethod · 0.95

Calls 2

appendMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected