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

Function BM_ReadString

tensorflow/core/lib/strings/ordered_code_test.cc:1230–1249  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1228}
1229
1230void BM_ReadString(int n, int len) {
1231 testing::StopTiming();
1232 random::PhiloxRandom philox(301, 17);
1233 random::SimplePhilox rnd(&philox);
1234 string x;
1235 for (int i = 0; i < len; i++) {
1236 x += rnd.Uniform(256);
1237 }
1238 string data;
1239 OCWriteToString<string>(&data, x);
1240 string result;
1241
1242 testing::BytesProcessed(n * len);
1243 testing::StartTiming();
1244 while (n-- > 0) {
1245 result.clear();
1246 StringPiece s = data;
1247 OCRead<string>(&s, &result);
1248 }
1249}
1250
1251void BM_WriteStringIncreasing(int n, int len) { BM_WriteString(n, len); }
1252void BM_ReadStringIncreasing(int n, int len) { BM_ReadString(n, len); }

Callers 1

BM_ReadStringIncreasingFunction · 0.85

Calls 5

StopTimingFunction · 0.85
BytesProcessedFunction · 0.85
StartTimingFunction · 0.85
UniformMethod · 0.80
clearMethod · 0.45

Tested by

no test coverage detected