- if ((strcmp(field, "calls") == 0) &&
- ((field = strtok_r(NULL, "=,", &saveptr_line)) != NULL)) {
-
- char *endptr = NULL;
- errno = 0;
- derive_t calls = strtoll(field, &endptr, 0);
-
- if ((endptr == field) || (errno != 0))
- continue;
-
- ERROR("redis plugin: Found CALLS value %lld (%s)", calls, command);
- redis_submit(rn->name, "commands", command, (value_t){.derive = calls});
+ const char *type;
+ /* only these are supported */
+ if (strcmp(field, "calls") == 0)
+ type = "commands";
+ else if (strcmp(field, "usec") == 0)
+ type = "redis_command_cputime";
+ else