Skip to content

Commit

Permalink
tests: Run prediction 10 times
Browse files Browse the repository at this point in the history
  • Loading branch information
marcojob committed Nov 11, 2024
1 parent 8c02c34 commit 34f32aa
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion test/test_depth_anything_v2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,11 @@ TEST_F(TestDepthAnythingV2, TestSetInput) {
}

TEST_F(TestDepthAnythingV2, TestPredict) {
depth_anything_v2->predict();
auto start = std::chrono::high_resolution_clock::now();
for (size_t i = 0; i < 10; i++) {
depth_anything_v2->predict();
}
auto end = std::chrono::high_resolution_clock::now();
std::chrono::duration<double> elapsed = end - start;
std::cout << "Time taken for 10 predictions: " << elapsed.count() << " seconds." << std::endl;
}

0 comments on commit 34f32aa

Please sign in to comment.