replies with query information
| 91 | |
| 92 | // replies with query information |
| 93 | static void _emit_running_query |
| 94 | ( |
| 95 | RedisModuleCtx *ctx, // redis module context |
| 96 | const CommandCtx *cmd // command context |
| 97 | ) { |
| 98 | ASSERT(ctx != NULL); |
| 99 | ASSERT(cmd != NULL); |
| 100 | |
| 101 | // compute query execution time |
| 102 | const double total_time = TIMER_GET_ELAPSED_MILLISECONDS(cmd->timer); |
| 103 | |
| 104 | RedisModule_ReplyWithArray(ctx, 5 * 2); |
| 105 | |
| 106 | // emit query received timestamp |
| 107 | Info_SectionAddEntryLongLong(ctx, RECEIVED_TIMESTAMP_KEY_NAME, |
| 108 | cmd->received_ts); |
| 109 | |
| 110 | // emit graph name |
| 111 | Info_SectionAddEntryString(ctx, GRAPH_NAME_KEY_NAME, |
| 112 | GraphContext_GetName(cmd->graph_ctx)); |
| 113 | |
| 114 | // emit query |
| 115 | Info_SectionAddEntryString(ctx, QUERY_KEY_NAME, cmd->query); |
| 116 | |
| 117 | // emit query wait duration |
| 118 | Info_SectionAddEntryDouble(ctx, EXECUTION_DURATION_KEY_NAME, total_time); |
| 119 | |
| 120 | // emit rather or not query was replicated |
| 121 | Info_SectionAddEntryLongLong(ctx, REPLICATION_KEY_NAME, |
| 122 | cmd->replicated_command); |
| 123 | } |
| 124 | |
| 125 | // replies with query information |
| 126 | static void _emit_waiting_query |
no test coverage detected