summaryrefslogtreecommitdiffstats
path: root/src/commands/function-stats.json
blob: 65519db1c307afd20f2aab84b7e857af74933782 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
{
    "STATS": {
        "summary": "Returns information about a function during execution.",
        "complexity": "O(1)",
        "group": "scripting",
        "since": "7.0.0",
        "arity": 2,
        "container": "FUNCTION",
        "function": "functionStatsCommand",
        "command_flags": [
            "NOSCRIPT",
            "ALLOW_BUSY"
        ],
        "acl_categories": [
            "SCRIPTING"
        ],
        "command_tips": [
            "NONDETERMINISTIC_OUTPUT",
            "REQUEST_POLICY:ALL_SHARDS",
            "RESPONSE_POLICY:SPECIAL"
        ],
        "reply_schema": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "running_script": {
                    "description": "information about the running script.",
                    "oneOf": [
                        {
                            "description": "If there's no in-flight function",
                            "type": "null"
                        },
                        {
                            "description": "a map with the information about the running script",
                            "type": "object",
                            "additionalProperties": false,
                            "properties": {
                                "name": {
                                    "description": "the name of the function.",
                                    "type": "string"
                                },
                                "command": {
                                    "description": "the command and arguments used for invoking the function.",
                                    "type": "array",
                                    "items": {
                                        "type": "string"
                                    }
                                },
                                "duration_ms": {
                                    "description": "the function's runtime duration in milliseconds.",
                                    "type": "integer"
                                }
                            }
                        }
                    ]
                },
                "engines": {
                    "description": "A map when each entry in the map represent a single engine.",
                    "type": "object",
                    "patternProperties": {
                        "^.*$": {
                            "description": "Engine map contains statistics about the engine",
                            "type": "object",
                            "additionalProperties": false,
                            "properties": {
                                "libraries_count": {
                                    "description": "number of libraries",
                                    "type": "integer"
                                },
                                "functions_count": {
                                    "description": "number of functions",
                                    "type": "integer"
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}