MCPcopy Create free account
hub / github.com/couchbase/forestdb / timed_fdb_commit

Function timed_fdb_commit

utils/timing.cc:24–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22#include "timing.h"
23
24ts_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
45ts_nsec timed_fdb_compact(fdb_file_handle *fhandle){
46

Callers

nothing calls this directly

Calls 2

get_monotonic_tsFunction · 0.85
ts_diffFunction · 0.85

Tested by

no test coverage detected