2021-01-12 19:28

Add metrics: real time ratio and cpu time ratio.

This PR introduces two metrics to measure performance of local slam: real time ratio, and cpu real time ratio. The latter is introduced to measure the headroom.

Real time ratio tells us how fast local slam processes the incoming sensor data. When SLAM is falling behind, this is below 100%. In the steady state it is 100% (The real time ratio is above 100% only when slam is 'catching up'.). So this does not tell us how much faster than real time slam processes the data. For this purpose the cpu real time ratio is introduced. It measures how much cpu time slam used, compared to the real time passed to collect the sensor data. Thus it can be more than 100% if slam is faster than real time. For example, a cpu real time ratio of 200% means that slam could process the data twice as fast as it comes in.

Three durations are measured: - sensor_duration: the physical time it took to collect the sensor data. - wall_time_duration: the time it took to process that data - thread_cpu_duration: CPU time it took to process that data.

And the metrics then are: real time ratio = sensor_duration / wall_time_duration cpu real time ratio = sensor_duration / thread_cpu_duration


  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答


  • weixin_39886841 weixin_39886841 4月前

    I can't add you as a reviewer, since you're not in the Cartographer organization yet, but PTAL, thx

    点赞 评论 复制链接分享
  • weixin_39790528 weixin_39790528 4月前

    lgtm with wohe's comments addressed.

    nit: for the commit summary maybe 'Add metrics: real time ratio and cpu time ratio' or something like it?

    点赞 评论 复制链接分享
  • weixin_39627405 weixin_39627405 4月前

    -the-cartographer merge

    点赞 评论 复制链接分享
  • weixin_39557402 weixin_39557402 4月前

    Merge requested by authorized user wohe. Merge queue now has a length of 3.

    点赞 评论 复制链接分享