35 #include "test_roscpp/PointCloud.h" 55 test_roscpp::PointCloud pc;
57 const int NUM_ITER = 100;
58 const int NUM_PTS = 1000000;
59 pc.pts.resize(NUM_PTS);
61 pc.chan[0].vals.resize(NUM_PTS);
62 pc.chan[1].vals.resize(NUM_PTS);
69 for (
int i = 0; i < NUM_ITER; ++i)
75 printf(
"avg serialization took %.6f sec\n",
toc() / (
double)NUM_ITER);
78 for (
int i = 0; i < NUM_ITER; i++)
80 test_roscpp::PointCloud pc2;
83 printf(
"avg deserization time %.6f sec\n",
toc() / (
double)NUM_ITER);
void deserializeMessage(const SerializedMessage &m, M &message)
void serialize(Stream &stream, const T &t)
uint32_t serializationLength(const T &t)
boost::shared_array< uint8_t > buf