| 1210 | } |
| 1211 | |
| 1212 | void 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 | |
| 1230 | void BM_ReadString(int n, int len) { |
| 1231 | testing::StopTiming(); |
no test coverage detected