MCPcopy Create free account
hub / github.com/RedisGraph/RedisGraph / _SlowLog_Contains

Function _SlowLog_Contains

src/slow_log/slow_log.c:107–124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

105}
106
107static bool _SlowLog_Contains
108(
109 const SlowLog *slowlog,
110 int t_id,
111 const char *cmd,
112 const char *query,
113 char **key,
114 SlowLogItem **item
115) {
116 size_t len = _compute_key(key, cmd, query);
117 rax *lookup = slowlog->lookup[t_id];
118 *item = (SlowLogItem *)raxFind(lookup, (unsigned char *)*key, len);
119 if(*item == raxNotFound) {
120 *item = NULL;
121 }
122
123 return (*item != NULL);
124}
125
126SlowLog *SlowLog_New(void) {
127 SlowLog *slowlog = rm_malloc(sizeof(SlowLog));

Callers 1

SlowLog_AddFunction · 0.85

Calls 1

_compute_keyFunction · 0.85

Tested by

no test coverage detected