Skip to content

Commit

Permalink
perf UPDATE performance tests for datastore plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
Humblesaw committed Apr 9, 2024
1 parent 367b188 commit 5a7f3cc
Show file tree
Hide file tree
Showing 3 changed files with 611 additions and 156 deletions.
9 changes: 6 additions & 3 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,13 @@ endif()
# sr_perf benchmark binary
if(ENABLE_PERF_TESTS)
add_executable(sr_perf ${CMAKE_CURRENT_SOURCE_DIR}/perf.c)
target_link_libraries(sr_perf sysrepo)
target_link_libraries(sr_perf sysrepo srobj)

add_test(NAME sr_perf_1000 COMMAND sr_perf 1000 10)
add_test(NAME sr_perf_100000 COMMAND sr_perf 100000 3)
add_test(NAME sr_perf_1000_10 COMMAND sr_perf 1000 10)

if(${CMAKE_VERSION} VERSION_GREATER "3.7")
set_tests_properties(sr_perf_1000_10 PROPERTIES FIXTURES_REQUIRED tests_cleanup)
endif()
endif()

# valgrind tests
Expand Down
12 changes: 12 additions & 0 deletions tests/files/perf.yang
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,18 @@ module perf {
type string;
}

leaf l {
type string;
}
}
list usr-lst {
key k;
ordered-by user;

leaf k {
type uint32;
}

leaf l {
type string;
}
Expand Down
Loading

0 comments on commit 5a7f3cc

Please sign in to comment.