Added notification benchmark (ntfbenchmark) and rpc benchmark models
[controller.git] / benchmark / api / src / main / yang / rpcbenchmark.yang
diff --git a/benchmark/api/src/main/yang/rpcbenchmark.yang b/benchmark/api/src/main/yang/rpcbenchmark.yang
new file mode 100644 (file)
index 0000000..7ec1357
--- /dev/null
@@ -0,0 +1,112 @@
+module rpcbenchmark {
+    yang-version 1;
+    namespace "urn:opendaylight:params:xml:ns:yang:rpcbenchmark";
+    prefix "rpcbenchmark";
+
+    revision "2015-07-02" {
+        description "Initial revision of rpcbenchmark model";
+    }
+
+    rpc test-status {
+        description
+          "Get test status";
+        output {
+            leaf execStatus {
+                type enumeration {
+                    enum "idle" {
+                        value 1;
+                    }
+                    enum "executing" {
+                        value 2;
+                    }
+                }
+            }
+            leaf global-server-cnt {
+                type uint32;
+                default 0;
+                description
+                  "The number of times the Global RPC server was invoked";
+
+            }
+        }
+    }
+
+    rpc start-test {
+        description
+            "Start a new RPC Benchmark test run";
+
+        input {
+            leaf operation {
+                mandatory true;
+                type enumeration {
+                    enum "GLOBAL-RTC" {
+                        value 1;
+                        description
+                          "Use Global RPC service and run-to-completion client";
+                    }
+                    enum "ROUTED-RTC" {
+                        value 2;
+                        description
+                          "Use routed RPC service and run-to-completion client. RPC server instances are
+                            dynamically created when the test starts and deleted when the test finishes";
+                    }
+                }
+                description
+                    "RPC type and client type to use in the test";
+            }
+            leaf num-clients {
+                type uint32;
+                default 1;
+                description
+                  "Number of clients (test client threads) to start";
+            }
+            leaf num-servers {
+                type uint32;
+                default 1;
+                description
+                  "Number of RPC server instances. Only valid for routed RPCs.";
+            }
+
+            leaf payload-size {
+                type uint32;
+                default 1;
+                description
+                  "Input/Output payload size: number of elements in the list of integers that is the input and output RPC payload";
+            }
+            leaf iterations {
+                type uint32;
+                default 1;
+                description
+                  "Number of calls to the specified RPC server that is to be made by each client";
+            }
+
+        }
+
+        output {
+            leaf global-rtc-client-ok {
+                type uint32;
+                default 0;
+                description
+                  "Number of successful calls to the Global RPC Server for all test threads";
+            }
+            leaf global-rtc-client-error {
+                type uint32;
+                default 0;
+                description
+                  "Number of failed calls to the Global RPC server from all test threads";
+            }
+            leaf exec-time {
+                type uint32;
+                default 0;
+                description
+                  "Test execution time, in milliseconds";
+            }
+            leaf rate {
+                type uint32;
+                default 0;
+                description
+                  "RPC rate (Number of RPCs/sec)";
+            }
+        }
+    }
+}