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
{
"DESTROY": {
"summary": "Destroy a consumer group.",
"summary": "Destroys a consumer group.",
"complexity": "O(N) where N is the number of entries in the group's pending entries list (PEL).",
"group": "stream",
"since": "5.0.0",
......
{
"HELP": {
"summary": "Show helpful text about the different subcommands",
"summary": "Returns helpful text about the different subcommands.",
"complexity": "O(1)",
"group": "stream",
"since": "5.0.0",
......
{
"SETID": {
"summary": "Set a consumer group to an arbitrary last delivered ID value.",
"summary": "Sets the last-delivered ID of a consumer group.",
"complexity": "O(1)",
"group": "stream",
"since": "5.0.0",
......
{
"XGROUP": {
"summary": "A container for consumer groups commands",
"summary": "A container for consumer groups commands.",
"complexity": "Depends on subcommand.",
"group": "stream",
"since": "5.0.0",
......
{
"CONSUMERS": {
"summary": "List the consumers in a consumer group",
"summary": "Returns a list of the consumers in a consumer group.",
"complexity": "O(1)",
"group": "stream",
"since": "5.0.0",
......
{
"GROUPS": {
"summary": "List the consumer groups of a stream",
"summary": "Returns a list of the consumer groups of a stream.",
"complexity": "O(1)",
"group": "stream",
"since": "5.0.0",
......
{
"HELP": {
"summary": "Show helpful text about the different subcommands",
"summary": "Returns helpful text about the different subcommands.",
"complexity": "O(1)",
"group": "stream",
"since": "5.0.0",
......
{
"STREAM": {
"summary": "Get information about a stream",
"summary": "Returns information about a stream.",
"complexity": "O(1)",
"group": "stream",
"since": "5.0.0",
......
{
"XINFO": {
"summary": "A container for stream introspection commands",
"summary": "A container for stream introspection commands.",
"complexity": "Depends on subcommand.",
"group": "stream",
"since": "5.0.0",
......
{
"XLEN": {
"summary": "Return the number of entries in a stream",
"summary": "Return the number of messages in a stream.",
"complexity": "O(1)",
"group": "stream",
"since": "5.0.0",
......
{
"XPENDING": {
"summary": "Return information and entries from a stream consumer group pending entries list, that are messages fetched but never acknowledged.",
"summary": "Returns the information and entries from a stream consumer group's pending entries list.",
"complexity": "O(N) with N being the number of elements returned, so asking for a small fixed number of entries per call is O(1). O(M), where M is the total number of entries scanned when used with the IDLE filter. When the command returns just the summary and the list of consumers is small, it runs in O(1) time; otherwise, an additional O(N) time for iterating every consumer.",
"group": "stream",
"since": "5.0.0",
......
{
"XRANGE": {
"summary": "Return a range of elements in a stream, with IDs matching the specified IDs interval",
"summary": "Returns the messages from a stream within a range of IDs.",
"complexity": "O(N) with N being the number of elements being returned. If N is constant (e.g. always asking for the first 10 elements with COUNT), you can consider it O(1).",
"group": "stream",
"since": "5.0.0",
......
{
"XREAD": {
"summary": "Return never seen elements in multiple streams, with IDs greater than the ones reported by the caller for each stream. Can block.",
"complexity": "For each stream mentioned: O(N) with N being the number of elements being returned, it means that XREAD-ing with a fixed COUNT is O(1). Note that when the BLOCK option is used, XADD will pay O(M) time in order to serve the M clients blocked on the stream getting new data.",
"summary": "Returns messages from multiple streams with IDs greater than the ones requested. Blocks until a message is available otherwise.",
"group": "stream",
"since": "5.0.0",
"arity": -4,
......
{
"XREADGROUP": {
"summary": "Return new entries from a stream using a consumer group, or access the history of the pending entries for a given consumer. Can block.",
"summary": "Returns new or historical messages from a stream for a consumer in agroup. Blocks until a message is available otherwise.",
"complexity": "For each stream mentioned: O(M) with M being the number of elements returned. If M is constant (e.g. always asking for the first 10 elements with COUNT), you can consider it O(1). On the other side when XREADGROUP blocks, XADD will pay the O(N) time in order to serve the N clients blocked on the stream getting new data.",
"group": "stream",
"since": "5.0.0",
......
{
"XREVRANGE": {
"summary": "Return a range of elements in a stream, with IDs matching the specified IDs interval, in reverse order (from greater to smaller IDs) compared to XRANGE",
"summary": "Returns the messages from a stream within a range of IDs in reverse order.",
"complexity": "O(N) with N being the number of elements returned. If N is constant (e.g. always asking for the first 10 elements with COUNT), you can consider it O(1).",
"group": "stream",
"since": "5.0.0",
......
{
"XSETID": {
"summary": "An internal command for replicating stream values",
"summary": "An internal command for replicating stream values.",
"complexity": "O(1)",
"group": "stream",
"since": "5.0.0",
......
{
"XTRIM": {
"summary": "Trims the stream to (approximately if '~' is passed) a certain size",
"summary": "Deletes messages from the beginning of a stream.",
"complexity": "O(N), with N being the number of evicted entries. Constant times are very small however, since entries are organized in macro nodes containing multiple entries that can be released with a single deallocation.",
"group": "stream",
"since": "5.0.0",
......
{
"ZADD": {
"summary": "Add one or more members to a sorted set, or update its score if it already exists",
"summary": "Adds one or more members to a sorted set, or updates their scores. Creates the key if it doesn't exist.",
"complexity": "O(log(N)) for each item added, where N is the number of elements in the sorted set.",
"group": "sorted_set",
"since": "1.2.0",
......
{
"ZCARD": {
"summary": "Get the number of members in a sorted set",
"summary": "Returns the number of members in a sorted set.",
"complexity": "O(1)",
"group": "sorted_set",
"since": "1.2.0",
......
{
"ZCOUNT": {
"summary": "Count the members in a sorted set with scores within the given values",
"summary": "Returns the count of members in a sorted set that have scores within a range.",
"complexity": "O(log(N)) with N being the number of elements in the sorted set.",
"group": "sorted_set",
"since": "2.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