| 69 | |
| 70 | template <typename T> |
| 71 | static void PrevectorDeserialize(benchmark::State& state) |
| 72 | { |
| 73 | CDataStream s0(SER_NETWORK, 0); |
| 74 | prevector<28, T> t0; |
| 75 | t0.resize(28); |
| 76 | for (auto x = 0; x < 900; ++x) { |
| 77 | s0 << t0; |
| 78 | } |
| 79 | t0.resize(100); |
| 80 | for (auto x = 0; x < 101; ++x) { |
| 81 | s0 << t0; |
| 82 | } |
| 83 | while (state.KeepRunning()) { |
| 84 | prevector<28, T> t1; |
| 85 | for (auto x = 0; x < 1000; ++x) { |
| 86 | s0 >> t1; |
| 87 | } |
| 88 | s0.Init(SER_NETWORK, 0); |
| 89 | } |
| 90 | } |
| 91 | |
| 92 | #define PREVECTOR_TEST(name, nontrivops, trivops) \ |
| 93 | static void Prevector ## name ## Nontrivial(benchmark::State& state) { \ |
nothing calls this directly
no test coverage detected