MCPcopy Create free account
hub / github.com/ElementsProject/elements / PrevectorDeserialize

Function PrevectorDeserialize

src/bench/prevector.cpp:62–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60
61template <typename T>
62static void PrevectorDeserialize(benchmark::Bench& bench)
63{
64 CDataStream s0(SER_NETWORK, 0);
65 prevector<28, T> t0;
66 t0.resize(28);
67 for (auto x = 0; x < 900; ++x) {
68 s0 << t0;
69 }
70 t0.resize(100);
71 for (auto x = 0; x < 101; ++x) {
72 s0 << t0;
73 }
74 bench.batch(1000).run([&] {
75 prevector<28, T> t1;
76 for (auto x = 0; x < 1000; ++x) {
77 s0 >> t1;
78 }
79 s0.Rewind();
80 });
81}
82
83#define PREVECTOR_TEST(name) \
84 static void Prevector##name##Nontrivial(benchmark::Bench& bench) \

Callers

nothing calls this directly

Calls 4

resizeMethod · 0.45
runMethod · 0.45
batchMethod · 0.45
RewindMethod · 0.45

Tested by

no test coverage detected