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

Function BM_WriteString

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

Source from the content-addressed store, hash-verified

1210}
1211
1212void BM_WriteString(int n, int len) {
1213 testing::StopTiming();
1214 random::PhiloxRandom philox(301, 17);
1215 random::SimplePhilox rnd(&philox);
1216 string x;
1217 for (int i = 0; i < len; i++) {
1218 x += rnd.Uniform(256);
1219 }
1220 string y;
1221
1222 testing::BytesProcessed(n * len);
1223 testing::StartTiming();
1224 while (n-- > 0) {
1225 y.clear();
1226 OCWriteToString<string>(&y, x);
1227 }
1228}
1229
1230void BM_ReadString(int n, int len) {
1231 testing::StopTiming();

Callers 1

BM_WriteStringIncreasingFunction · 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