MCPcopy Create free account
hub / github.com/Simple-Robotics/Simple / printSimulationPerfStats

Function printSimulationPerfStats

sandbox/sim_utils.py:236–250  ·  view source on GitHub ↗
(step_timings: np.ndarray)

Source from the content-addressed store, hash-verified

234
235
236def printSimulationPerfStats(step_timings: np.ndarray):
237 print("============================================")
238 print("SIMULATION")
239 print("Time elapsed: ", np.sum(step_timings))
240 print(
241 "Mean timings time step: {mean:.2f} +/- {std:.2f} microseconds".format(
242 mean=np.mean(step_timings) * 1e6, std=np.std(step_timings) * 1e6
243 )
244 )
245 print(
246 "Steps frequency: {freq:.2f} kHz".format(
247 freq=(step_timings.size) / np.sum(step_timings) * 1e-3
248 )
249 )
250 print("============================================")
251
252
253def runMujocoXML(model_path: str, args: SimulationArgs):

Callers 6

humanoid_mj.pyFile · 0.90
cassie_mj.pyFile · 0.90
pendulum.pyFile · 0.90
runMujocoXMLFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected