Load from VFS in parsing benchmark.

PiperOrigin-RevId: 610384849
Change-Id: Id226c30f1629d6b4bbc2231c1e998e733c27772e
This commit is contained in:
Kyle Bayes
2024-02-26 06:07:10 -08:00
committed by Copybara-Service
parent 03a8fa9ca9
commit b47d97652e
2 changed files with 27 additions and 11 deletions
+2 -7
View File
@@ -14,7 +14,7 @@
// A benchmark which steps various models without rendering, and measures speed.
#include <array>
#include <vector>
#include <benchmark/benchmark.h>
#include <gmock/gmock.h>
@@ -28,17 +28,12 @@
namespace mujoco {
namespace {
// number of steps to roll out before benhmarking
// number of steps to roll out before benchmarking
static const int kNumWarmupSteps = 500;
// number of steps to benchmark
static const int kNumBenchmarkSteps = 50;
// copy array into vector
std::vector<mjtNum> AsVector(const mjtNum* array, int n) {
return std::vector<mjtNum>(array, array + n);
}
static void run_step_benchmark(const mjModel* model, benchmark::State& state) {
mjData* data = mj_makeData(model);