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
{
"PFCOUNT": {
"summary": "Return the approximated cardinality of the set(s) observed by the HyperLogLog at key(s).",
"summary": "Returns the approximated cardinality of the set(s) observed by the HyperLogLog key(s).",
"complexity": "O(1) with a very small average constant time when called with a single key. O(N) with N being the number of keys, and much bigger constant times, when called with multiple keys.",
"group": "hyperloglog",
"since": "2.8.9",
......
{
"PFDEBUG": {
"summary": "Internal commands for debugging HyperLogLog values",
"summary": "Internal commands for debugging HyperLogLog values.",
"complexity": "N/A",
"group": "hyperloglog",
"since": "2.8.9",
......
{
"PFMERGE": {
"summary": "Merge N different HyperLogLogs into a single one.",
"summary": "Merges one or more HyperLogLog values into a single key.",
"complexity": "O(N) to merge N HyperLogLogs, but with high constant times.",
"group": "hyperloglog",
"since": "2.8.9",
......
{
"PFSELFTEST": {
"summary": "An internal command for testing HyperLogLog values",
"summary": "An internal command for testing HyperLogLog values.",
"complexity": "N/A",
"group": "hyperloglog",
"since": "2.8.9",
......
{
"PING": {
"summary": "Ping the server",
"summary": "Returns the server's liveliness response.",
"complexity": "O(1)",
"group": "connection",
"since": "1.0.0",
......
{
"PSETEX": {
"summary": "Set the value and expiration in milliseconds of a key",
"summary": "Sets both string value and expiration time in milliseconds of a key. The key is created if it doesn't exist.",
"complexity": "O(1)",
"group": "string",
"since": "2.6.0",
......
{
"PSUBSCRIBE": {
"summary": "Listen for messages published to channels matching the given patterns",
"summary": "Listens for messages published to channels that match one or more patterns.",
"complexity": "O(N) where N is the number of patterns the client is already subscribed to.",
"group": "pubsub",
"since": "2.0.0",
......
{
"PSYNC": {
"summary": "Internal command used for replication",
"summary": "An internal command used in replication.",
"group": "server",
"since": "2.8.0",
"arity": -3,
......
{
"PTTL": {
"summary": "Get the time to live for a key in milliseconds",
"summary": "Returns the expiration time in milliseconds of a key.",
"complexity": "O(1)",
"group": "generic",
"since": "2.6.0",
......
{
"PUBLISH": {
"summary": "Post a message to a channel",
"summary": "Posts a message to a channel.",
"complexity": "O(N+M) where N is the number of clients subscribed to the receiving channel and M is the total number of subscribed patterns (by any client).",
"group": "pubsub",
"since": "2.0.0",
......
{
"CHANNELS": {
"summary": "List active channels",
"summary": "Returns the active channels.",
"complexity": "O(N) where N is the number of active channels, and assuming constant time pattern matching (relatively short channels and patterns)",
"group": "pubsub",
"since": "2.8.0",
......
{
"HELP": {
"summary": "Show helpful text about the different subcommands",
"summary": "Returns helpful text about the different subcommands.",
"complexity": "O(1)",
"group": "pubsub",
"since": "6.2.0",
......
{
"NUMPAT": {
"summary": "Get the count of unique patterns pattern subscriptions",
"summary": "Returns a count of unique pattern subscriptions.",
"complexity": "O(1)",
"group": "pubsub",
"since": "2.8.0",
......
{
"NUMSUB": {
"summary": "Get the count of subscribers for channels",
"summary": "Returns a count of subscribers to channels.",
"complexity": "O(N) for the NUMSUB subcommand, where N is the number of requested channels",
"group": "pubsub",
"since": "2.8.0",
......
{
"SHARDCHANNELS": {
"summary": "List active shard channels",
"summary": "Returns the active shard channels.",
"complexity": "O(N) where N is the number of active shard channels, and assuming constant time pattern matching (relatively short shard channels).",
"group": "pubsub",
"since": "7.0.0",
......
{
"SHARDNUMSUB": {
"summary": "Get the count of subscribers for shard channels",
"summary": "Returns the count of subscribers of shard channels.",
"complexity": "O(N) for the SHARDNUMSUB subcommand, where N is the number of requested shard channels",
"group": "pubsub",
"since": "7.0.0",
......
{
"PUBSUB": {
"summary": "A container for Pub/Sub commands",
"summary": "A container for Pub/Sub commands.",
"complexity": "Depends on subcommand.",
"group": "pubsub",
"since": "2.8.0",
......
{
"PUNSUBSCRIBE": {
"summary": "Stop listening for messages posted to channels matching the given patterns",
"summary": "Stops listening to messages published to channels that match one or more patterns.",
"complexity": "O(N+M) where N is the number of patterns the client is already subscribed and M is the number of total patterns subscribed in the system (by any client).",
"group": "pubsub",
"since": "2.0.0",
......
{
"QUIT": {
"summary": "Close the connection",
"summary": "Closes the connection.",
"complexity": "O(1)",
"group": "connection",
"since": "1.0.0",
......
{
"RANDOMKEY": {
"summary": "Return a random key from the keyspace",
"summary": "Returns a random key name from the database.",
"complexity": "O(1)",
"group": "generic",
"since": "1.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