Added notification benchmark (ntfbenchmark) and rpc benchmark models
[controller.git] / benchmark / api / src / main / yang / ntfbenchmark.yang
1 module ntfbenchmark {
2     yang-version 1;
3     namespace "urn:opendaylight:params:xml:ns:yang:ntfbenchmark";
4     prefix "ntfbenchmark";
5
6     revision "2015-01-05" {
7         description "Initial revision of ntfbenchmark 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 ntf-cnt {
25                 type uint32;
26                 default 0;
27                 description
28                   "The number of times the notification benchmark test was invoked";
29             }
30         }
31     }
32
33     rpc start-test {
34         description
35             "Start a new RPC Benchmark test";
36
37         input {
38             leaf producer-type {
39                 mandatory true;
40                 type enumeration {
41                     enum "BLOCKING" {
42                         value 1;
43                         description
44                           "The producer waits for a free slot in RPC Broker's ring buffer";
45                     }
46                     enum "DROPPING" {
47                         value 2;
48                         description
49                           "The producer drops a notification if there is no free slot in RPC Broker's ring buffer";
50                     }
51                 }
52                 description
53                     "RPC type and client type to use in the test";
54             }
55             leaf producers {
56                 type uint32;
57                 default 1;
58                 description
59                   "Number of notification producers (test client threads) to start";
60             }
61             leaf listeners {
62                 type uint32;
63                 default 1;
64                 description
65                   "Number of notification listener instances";
66             }
67
68             leaf payload-size {
69                 type uint32;
70                 default 1;
71                 description
72                   "Notification payload size: number of elements in the list of integers that is the notification payload";
73             }
74             leaf iterations {
75                 type uint32;
76                 default 1;
77                 description
78                   "Number of notifications to generate in each client thread";
79             }
80
81          }
82
83         output {
84             leaf listener-ok {
85                 type uint32;
86                 default 0;
87                 description
88                   "Number of successfully creceived notifications by all listeners";
89             }
90             leaf producer-ok {
91                 type uint32;
92                 default 0;
93                 description
94                   "Number of successfully generated notifications in all producer clients";
95             }
96             leaf producer-error {
97                 type uint32;
98                 default 0;
99                 description
100                   "Number of errors encoutered during notification generation at all producers";
101             }
102                leaf producer-elapsed-time {
103                 type uint32;
104                 default 0;
105                 description
106                   "The time it took for all producers to finish (i.e. to send their notifications), in milliseconds";
107             }
108                leaf listener-elapsed-time {
109                 type uint32;
110                 default 0;
111                 description
112                   "The time it took for all listeners to finish (i.e. to receive their notifications), in milliseconds";
113             }
114                leaf producer-rate {
115                 type uint32;
116                 default 0;
117                 description
118                   "RPC rate (Number of RPCs/sec)";
119             }
120                leaf listener-rate {
121                 type uint32;
122                 default 0;
123                 description
124                   "RPC rate (Number of RPCs/sec)";
125             }
126            }
127     }
128 }