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

Function RandomKey

tensorflow/core/lib/io/table_test.cc:51–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49 return StringPiece(*dst);
50}
51static string RandomKey(random::SimplePhilox* rnd, int len) {
52 // Make sure to generate a wide variety of characters so we
53 // test the boundary conditions for short-key optimizations.
54 static const char kTestChars[] = {'\0', '\1', 'a', 'b', 'c',
55 'd', 'e', '\xfd', '\xfe', '\xff'};
56 string result;
57 for (int i = 0; i < len; i++) {
58 result += kTestChars[rnd->Uniform(sizeof(kTestChars))];
59 }
60 return result;
61}
62static StringPiece CompressibleString(random::SimplePhilox* rnd,
63 double compressed_fraction, size_t len,
64 string* dst) {

Callers 1

TEST_FFunction · 0.85

Calls 1

UniformMethod · 0.80

Tested by

no test coverage detected