Commit 45cb2bf3 authored by Pavel Pisa's avatar Pavel Pisa

Merge branch 'master-wr-test' into 'master'

driver: add measurement of write access time to userspace test application.

See merge request !198
parents 46efeb70 c2304411
Pipeline #5908 failed with stages
in 56 minutes and 57 seconds
......@@ -302,6 +302,17 @@ int main(int argc, char *argv[])
printf("%d reads takes %ld.%09ld s\n",
i, (long)diff.tv_sec, diff.tv_nsec);
dummy = 0;
clock_gettime(CLOCK_MONOTONIC, &tic);
for (i = 0; i < 1000 * 1000; i++) {
ctu_can_fd_write32(priv, CTU_CAN_FD_FILTER_C_VAL, dummy);
}
clock_gettime(CLOCK_MONOTONIC, &tac);
timespec_sub(&diff, &tac, &tic);
printf("%d writes takes %ld.%09ld s\n",
i, (long)diff.tv_sec, diff.tv_nsec);
return 0;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment