Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Nikolaos Passalis <[email protected]>
  • Loading branch information
tsampazk and passalis authored Apr 5, 2023
1 parent 5182ad0 commit 3a30c7d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ def callback(self, data):
:type data: sensor_msgs.msg.Image
"""
fps = data.data
rospy.loginfo(f"Time per frame: {str(round(1.0 / fps, 4))} sec")
rospy.loginfo(f"Time per inference: {str(round(1.0 / fps, 4))} sec")
while len(self.fps_window) < self.window_length:
self.fps_window.append(fps)
self.fps_window = self.fps_window[1:]
self.fps_window.append(fps)
rospy.loginfo(f"Average FPS : {round(mean(self.fps_window), 2)}") # NOQA
rospy.loginfo(f"Average inferences per second : {round(mean(self.fps_window), 2)}") # NOQA


def main():
Expand Down

0 comments on commit 3a30c7d

Please sign in to comment.