| 22 | #include "timing.h" |
| 23 | |
| 24 | ts_nsec timed_fdb_commit(fdb_file_handle *fhandle, bool walflush){ |
| 25 | |
| 26 | ts_nsec start, end; |
| 27 | fdb_status status; |
| 28 | |
| 29 | start = get_monotonic_ts(); |
| 30 | if(walflush){ |
| 31 | status = fdb_commit(fhandle, FDB_COMMIT_MANUAL_WAL_FLUSH); |
| 32 | } else { |
| 33 | status = fdb_commit(fhandle, FDB_COMMIT_NORMAL); |
| 34 | } |
| 35 | |
| 36 | end = get_monotonic_ts(); |
| 37 | |
| 38 | if(status == FDB_RESULT_SUCCESS){ |
| 39 | return ts_diff(start, end); |
| 40 | } else { |
| 41 | return ERR_NS; |
| 42 | } |
| 43 | } |
| 44 | |
| 45 | ts_nsec timed_fdb_compact(fdb_file_handle *fhandle){ |
| 46 |
nothing calls this directly
no test coverage detected