7ec13578bfaeb1e16190550ce4386da2fbfe326b
[controller.git] / benchmark / api / src / main / yang / rpcbenchmark.yang
1 module rpcbenchmark {
2     yang-version 1;
3     namespace "urn:opendaylight:params:xml:ns:yang:rpcbenchmark";
4     prefix "rpcbenchmark";
5
6     revision "2015-07-02" {
7         description "Initial revision of rpcbenchmark model";
8     }
9
10     rpc test-status {
11         description
12           "Get test status";
13         output {
14             leaf execStatus {
15                 type enumeration {
16                     enum "idle" {
17                         value 1;
18                     }
19                     enum "executing" {
20                         value 2;
21                     }
22                 }
23             }
24             leaf global-server-cnt {
25                 type uint32;
26                 default 0;
27                 description
28                   "The number of times the Global RPC server was invoked";
29
30             }
31         }
32     }
33
34     rpc start-test {
35         description
36             "Start a new RPC Benchmark test run";
37
38         input {
39             leaf operation {
40                 mandatory true;
41                 type enumeration {
42                     enum "GLOBAL-RTC" {
43                         value 1;
44                         description
45                           "Use Global RPC service and run-to-completion client";
46                     }
47                     enum "ROUTED-RTC" {
48                         value 2;
49                         description
50                           "Use routed RPC service and run-to-completion client. RPC server instances are
51                             dynamically created when the test starts and deleted when the test finishes";
52                     }
53                 }
54                 description
55                     "RPC type and client type to use in the test";
56             }
57             leaf num-clients {
58                 type uint32;
59                 default 1;
60                 description
61                   "Number of clients (test client threads) to start";
62             }
63             leaf num-servers {
64                 type uint32;
65                 default 1;
66                 description
67                   "Number of RPC server instances. Only valid for routed RPCs.";
68             }
69
70             leaf payload-size {
71                 type uint32;
72                 default 1;
73                 description
74                   "Input/Output payload size: number of elements in the list of integers that is the input and output RPC payload";
75             }
76             leaf iterations {
77                 type uint32;
78                 default 1;
79                 description
80                   "Number of calls to the specified RPC server that is to be made by each client";
81             }
82
83         }
84
85         output {
86             leaf global-rtc-client-ok {
87                 type uint32;
88                 default 0;
89                 description
90                   "Number of successful calls to the Global RPC Server for all test threads";
91             }
92             leaf global-rtc-client-error {
93                 type uint32;
94                 default 0;
95                 description
96                   "Number of failed calls to the Global RPC server from all test threads";
97             }
98             leaf exec-time {
99                 type uint32;
100                 default 0;
101                 description
102                   "Test execution time, in milliseconds";
103             }
104             leaf rate {
105                 type uint32;
106                 default 0;
107                 description
108                   "RPC rate (Number of RPCs/sec)";
109             }
110         }
111     }
112 }