Unverified Commit 0c3b8b7e authored by Itamar Haber's avatar Itamar Haber Committed by GitHub
Browse files

Overhauls command summaries and man pages. (#11942)

This is an attempt to normalize/formalize command summaries.

Main actions performed:

* Starts with the continuation of the phrase "The XXXX command, when called, ..." for user commands.
* Starts with "An internal command...", "A container command...", etc... when applicable.
* Always uses periods.
* Refrains from referring to other commands. If this is needed, backquotes should be used for command names.
* Tries to be very clear about the data type when applicable.
* Tries to mention additional effects, e.g. "The key is created if it doesn't exist" and "The set is deleted if the last member is removed."
* Prefers being terse over verbose.
* Tries to be consistent.
parent cb171786
{ {
"LOLWUT": { "LOLWUT": {
"summary": "Display some computer art and the Redis version", "summary": "Displays computer art and the Redis version",
"group": "server", "group": "server",
"since": "5.0.0", "since": "5.0.0",
"arity": -1, "arity": -1,
......
{ {
"LPOP": { "LPOP": {
"summary": "Remove and get the first elements in a list", "summary": "Returns the first elements in a list after removing it. Deletes the list if the last element was popped.",
"complexity": "O(N) where N is the number of elements returned", "complexity": "O(N) where N is the number of elements returned",
"group": "list", "group": "list",
"since": "1.0.0", "since": "1.0.0",
......
{ {
"LPOS": { "LPOS": {
"summary": "Return the index of matching elements on a list", "summary": "Returns the index of matching elements in a list.",
"complexity": "O(N) where N is the number of elements in the list, for the average case. When searching for elements near the head or the tail of the list, or when the MAXLEN option is provided, the command may run in constant time.", "complexity": "O(N) where N is the number of elements in the list, for the average case. When searching for elements near the head or the tail of the list, or when the MAXLEN option is provided, the command may run in constant time.",
"group": "list", "group": "list",
"since": "6.0.6", "since": "6.0.6",
......
{ {
"LPUSH": { "LPUSH": {
"summary": "Prepend one or multiple elements to a list", "summary": "Prepends one or more elements to a list. Creates the key if it doesn't exist.",
"complexity": "O(1) for each element added, so O(N) to add N elements when the command is called with multiple arguments.", "complexity": "O(1) for each element added, so O(N) to add N elements when the command is called with multiple arguments.",
"group": "list", "group": "list",
"since": "1.0.0", "since": "1.0.0",
......
{ {
"LPUSHX": { "LPUSHX": {
"summary": "Prepend an element to a list, only if the list exists", "summary": "Prepends one or more elements to a list only when the list exists.",
"complexity": "O(1) for each element added, so O(N) to add N elements when the command is called with multiple arguments.", "complexity": "O(1) for each element added, so O(N) to add N elements when the command is called with multiple arguments.",
"group": "list", "group": "list",
"since": "2.2.0", "since": "2.2.0",
......
{ {
"LRANGE": { "LRANGE": {
"summary": "Get a range of elements from a list", "summary": "Returns a range of elements from a list.",
"complexity": "O(S+N) where S is the distance of start offset from HEAD for small lists, from nearest end (HEAD or TAIL) for large lists; and N is the number of elements in the specified range.", "complexity": "O(S+N) where S is the distance of start offset from HEAD for small lists, from nearest end (HEAD or TAIL) for large lists; and N is the number of elements in the specified range.",
"group": "list", "group": "list",
"since": "1.0.0", "since": "1.0.0",
......
{ {
"LREM": { "LREM": {
"summary": "Remove elements from a list", "summary": "Removes elements from a list. Deletes the list if the last element was removed.",
"complexity": "O(N+M) where N is the length of the list and M is the number of elements removed.", "complexity": "O(N+M) where N is the length of the list and M is the number of elements removed.",
"group": "list", "group": "list",
"since": "1.0.0", "since": "1.0.0",
......
{ {
"LSET": { "LSET": {
"summary": "Set the value of an element in a list by its index", "summary": "Sets the value of an element in a list by its index.",
"complexity": "O(N) where N is the length of the list. Setting either the first or the last element of the list is O(1).", "complexity": "O(N) where N is the length of the list. Setting either the first or the last element of the list is O(1).",
"group": "list", "group": "list",
"since": "1.0.0", "since": "1.0.0",
......
{ {
"LTRIM": { "LTRIM": {
"summary": "Trim a list to the specified range", "summary": "Removes elements from both ends a list. Deletes the list if all elements were trimmed.",
"complexity": "O(N) where N is the number of elements to be removed by the operation.", "complexity": "O(N) where N is the number of elements to be removed by the operation.",
"group": "list", "group": "list",
"since": "1.0.0", "since": "1.0.0",
......
{ {
"DOCTOR": { "DOCTOR": {
"summary": "Outputs memory problems report", "summary": "Outputs a memory problems report.",
"complexity": "O(1)", "complexity": "O(1)",
"group": "server", "group": "server",
"since": "4.0.0", "since": "4.0.0",
......
{ {
"HELP": { "HELP": {
"summary": "Show helpful text about the different subcommands", "summary": "Returns helpful text about the different subcommands.",
"complexity": "O(1)", "complexity": "O(1)",
"group": "server", "group": "server",
"since": "4.0.0", "since": "4.0.0",
......
{ {
"MALLOC-STATS": { "MALLOC-STATS": {
"summary": "Show allocator internal stats", "summary": "Returns the allocator statistics.",
"complexity": "Depends on how much memory is allocated, could be slow", "complexity": "Depends on how much memory is allocated, could be slow",
"group": "server", "group": "server",
"since": "4.0.0", "since": "4.0.0",
......
{ {
"PURGE": { "PURGE": {
"summary": "Ask the allocator to release memory", "summary": "Asks the allocator to release memory.",
"complexity": "Depends on how much memory is allocated, could be slow", "complexity": "Depends on how much memory is allocated, could be slow",
"group": "server", "group": "server",
"since": "4.0.0", "since": "4.0.0",
......
{ {
"STATS": { "STATS": {
"summary": "Show memory usage details", "summary": "Returns details about memory usage.",
"complexity": "O(1)", "complexity": "O(1)",
"group": "server", "group": "server",
"since": "4.0.0", "since": "4.0.0",
......
{ {
"USAGE": { "USAGE": {
"summary": "Estimate the memory usage of a key", "summary": "Estimates the memory usage of a key.",
"complexity": "O(N) where N is the number of samples.", "complexity": "O(N) where N is the number of samples.",
"group": "server", "group": "server",
"since": "4.0.0", "since": "4.0.0",
......
{ {
"MEMORY": { "MEMORY": {
"summary": "A container for memory diagnostics commands", "summary": "A container for memory diagnostics commands.",
"complexity": "Depends on subcommand.", "complexity": "Depends on subcommand.",
"group": "server", "group": "server",
"since": "4.0.0", "since": "4.0.0",
......
{ {
"MGET": { "MGET": {
"summary": "Get the values of all the given keys", "summary": "Atomically returns the string values of one or more keys.",
"complexity": "O(N) where N is the number of keys to retrieve.", "complexity": "O(N) where N is the number of keys to retrieve.",
"group": "string", "group": "string",
"since": "1.0.0", "since": "1.0.0",
......
{ {
"MIGRATE": { "MIGRATE": {
"summary": "Atomically transfer a key from a Redis instance to another one.", "summary": "Atomically transfers a key from one Redis instance to another.",
"complexity": "This command actually executes a DUMP+DEL in the source instance, and a RESTORE in the target instance. See the pages of these commands for time complexity. Also an O(N) data transfer between the two instances is performed.", "complexity": "This command actually executes a DUMP+DEL in the source instance, and a RESTORE in the target instance. See the pages of these commands for time complexity. Also an O(N) data transfer between the two instances is performed.",
"group": "generic", "group": "generic",
"since": "2.6.0", "since": "2.6.0",
......
{ {
"HELP": { "HELP": {
"summary": "Show helpful text about the different subcommands", "summary": "Returns helpful text about the different subcommands.",
"complexity": "O(1)", "complexity": "O(1)",
"group": "server", "group": "server",
"since": "5.0.0", "since": "5.0.0",
......
{ {
"LIST": { "LIST": {
"summary": "List all modules loaded by the server", "summary": "Returns all loaded modules.",
"complexity": "O(N) where N is the number of loaded modules.", "complexity": "O(N) where N is the number of loaded modules.",
"group": "server", "group": "server",
"since": "4.0.0", "since": "4.0.0",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment