Skip to content

Commit

Permalink
make tests faster
Browse files Browse the repository at this point in the history
  • Loading branch information
hariharan-devarajan committed Sep 30, 2024
1 parent 3986ec6 commit 6707f59
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions test/c/test.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ void foo() {
DFTRACER_C_FUNCTION_START();
DFTRACER_C_FUNCTION_UPDATE_INT("key", 0);
DFTRACER_C_FUNCTION_UPDATE_STR("key", "0");
sleep(1);
usleep(1000);
DFTRACER_C_REGION_START(CUSTOM);
DFTRACER_C_REGION_UPDATE_INT(CUSTOM, "key", 0);
DFTRACER_C_REGION_UPDATE_STR(CUSTOM, "key", "0");
bar();
sleep(1);
usleep(1000);
DFTRACER_C_REGION_START(CUSTOM_BLOCK);
sleep(1);
usleep(1000);
DFTRACER_C_REGION_END(CUSTOM_BLOCK);
DFTRACER_C_REGION_END(CUSTOM);
DFTRACER_C_FUNCTION_END();
Expand Down
6 changes: 3 additions & 3 deletions test/cpp/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ void foo() {

DFTRACER_CPP_FUNCTION_UPDATE("key", 0);
DFTRACER_CPP_FUNCTION_UPDATE("key", "0");
sleep(1);
usleep(1000);
{
DFTRACER_CPP_REGION(CUSTOM);
DFTRACER_CPP_REGION_UPDATE(CUSTOM, "key", "0");
sleep(1);
usleep(1000);
DFTRACER_CPP_REGION_START(CUSTOM_BLOCK);
DFTRACER_CPP_REGION_UPDATE(CUSTOM, "key", 0);
DFTRACER_CPP_REGION_DYN_UPDATE(CUSTOM_BLOCK, "key", 0);
sleep(1);
usleep(1000);
DFTRACER_CPP_REGION_END(CUSTOM_BLOCK);
}
}
Expand Down
6 changes: 3 additions & 3 deletions test/py/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,18 @@

@dft_fn.log
def log_events(index):
sleep(1)
sleep(0.001)


def custom_events():
log_inst.enter_event()
start = log_inst.get_time()
sleep(1)
sleep(0.001)
end = log_inst.get_time()
log_inst.log_event("test", "cat2", start, end - start)
log_inst.exit_event()
for i in dft_fn.iter(range(2)):
sleep(1)
sleep(0.001)


def posix_calls(val):
Expand Down

0 comments on commit 6707f59

Please sign in to comment.