<commit_before>module dsbenchmark {
    yang-version 1;
    namespace "urn:opendaylight:params:xml:ns:yang:dsbenchmark";
    prefix "dsbenchmark";

    revision "2015-01-05" {
        description "Initial revision of dsbenchmark model";
    }
    container test-exec {
        config true;

        list outer-list {
            key id;
            leaf id {
                type int32;
            }
            choice outer-choice {
                case one {
                    leaf one {
                        type string;
                    }
                }
                case two-three {
                    leaf two {
                        type string;
                    }
                    leaf three {
                        type string;
                    }
               }
           }
           list inner-list {
                key name;
                leaf name {
                    type int32;
                }
                leaf value {
                    type string;
                }
            }
        }
    }

    container test-status {
        leaf execStatus {
            type enumeration {
                enum "idle" {
                    value 1;
                }
                enum "executing" {
                    value 2;
                }
            }
            config false;
            mandatory true;
            description
                "Indicates whether a test run is in progress; only one test can run at a time";
        }
        leaf testsCompleted {
            type uint32;
            default 1;
            description
                "Number of completed test runs";
          }
    }

    rpc start-test {
        description
          "Start a new data store write test run";

        input {
            leaf operation {
                mandatory true;
                type enumeration {
                    enum "PUT" {
                        value 1;
                        description
                          "The put operation";
                    }
                    enum "MERGE" {
                        value 2;
                        description
                          "The merge operation";
                    }
                    enum "DELETE" {
                        value 3;
                        description
                            "Delete items from a list sorted in the data store";
                    }
                    enum "READ" {
                        value 4;
                        description
                        "The read operation";
                    }
                }
                description
                    "Type of the transaction operation to benchmark";
            }

            leaf data-format {
                mandatory true;
                type enumeration {
                    enum "BINDING-AWARE" {
                        value 1;
                    }
                    enum "BINDING-INDEPENDENT" {
                        value 2;
                    }
                }
                description
                    "Data format:-binding-aware or binding-independent";
            }

            leaf transaction-type {
                mandatory true;
                type enumeration {
                    enum "SIMPLE-TX" {
                        value 1;
                    }
                    enum "TX-CHAINING" {
                        value 2;
                    }
                }
                description
                    "Data format:-binding-aware or binding-independent";
            }

            leaf data-store {
                mandatory true;
                type enumeration {
                    enum "CONFIG" {
                        value 1;
                    }
                    enum "OPERATIONAL" {
                        value 2;
                    }
                    enum "BOTH" {
                        value 3;
                    }
                }
            }
            leaf outerElements {
                type uint32;
                default 100000;
                description
                  "Number of elements in the OuterList";
            }
            leaf innerElements {
                type uint32;
                default 1;
                description
                  "Number of elements in the InnerList";
            }
            leaf putsPerTx {
                type uint32;
                default 1;
                description
                  "Number of write operations (PUT, MERGE, or DELETE)
                   per transaction submit";
            }
            leaf listeners {
                type uint32;
                default 0;
                description
                    "Number of data tree change listeners listening for
                    changes on the test exec tree.";
            }
        }
        output {
            leaf status {
                mandatory true;
                type enumeration {
                    enum "OK" {
                        value 1;
                    }
                    enum "FAILED" {
                        value 2;
                    }
                    enum "TEST-IN-PROGRESS" {
                        value 3;
                    }
                }
                description
                    "Indicates whether the test finished successfuly";
            }
            leaf listBuildTime {
                type uint32;
                description
                  "The time it took to build the list of lists";
            }
            leaf execTime {
                type uint32;
                description
                  "The time it took to execute all transactions";
            }
            leaf txOk {
                type uint32;
                description
                  "The number of successful transactions";
            }
            leaf txError {
                type uint32;
                description
                  "The number of failed transactions";
            }
            leaf ntfOk {
                type uint32;
                description
                  "The number of successfully received data tree change<commit_msg>BUG-7783: increase precision of execution times<commit_after>module dsbenchmark {
    yang-version 1;
    namespace "urn:opendaylight:params:xml:ns:yang:dsbenchmark";
    prefix "dsbenchmark";

    revision "2015-01-05" {
        description "Initial revision of dsbenchmark model";
    }
    container test-exec {
        config true;

        list outer-list {
            key id;
            leaf id {
                type int32;
            }
            choice outer-choice {
                case one {
                    leaf one {
                        type string;
                    }
                }
                case two-three {
                    leaf two {
                        type string;
                    }
                    leaf three {
                        type string;
                    }
               }
           }
           list inner-list {
                key name;
                leaf name {
                    type int32;
                }
                leaf value {
                    type string;
                }
            }
        }
    }

    container test-status {
        leaf execStatus {
            type enumeration {
                enum "idle" {
                    value 1;
                }
                enum "executing" {
                    value 2;
                }
            }
            config false;
            mandatory true;
            description
                "Indicates whether a test run is in progress; only one test can run at a time";
        }
        leaf testsCompleted {
            type uint32;
            default 1;
            description
                "Number of completed test runs";
          }
    }

    rpc start-test {
        description
          "Start a new data store write test run";

        input {
            leaf operation {
                mandatory true;
                type enumeration {
                    enum "PUT" {
                        value 1;
                        description
                          "The put operation";
                    }
                    enum "MERGE" {
                        value 2;
                        description
                          "The merge operation";
                    }
                    enum "DELETE" {
                        value 3;
                        description
                            "Delete items from a list sorted in the data store";
                    }
                    enum "READ" {
                        value 4;
                        description
                        "The read operation";
                    }
                }
                description
                    "Type of the transaction operation to benchmark";
            }

            leaf data-format {
                mandatory true;
                type enumeration {
                    enum "BINDING-AWARE" {
                        value 1;
                    }
                    enum "BINDING-INDEPENDENT" {
                        value 2;
                    }
                }
                description
                    "Data format:-binding-aware or binding-independent";
            }

            leaf transaction-type {
                mandatory true;
                type enumeration {
                    enum "SIMPLE-TX" {
                        value 1;
                    }
                    enum "TX-CHAINING" {
                        value 2;
                    }
                }
                description
                    "Data format:-binding-aware or binding-independent";
            }

            leaf data-store {
                mandatory true;
                type enumeration {
                    enum "CONFIG" {
                        value 1;
                    }
                    enum "OPERATIONAL" {
                        value 2;
                    }
                    enum "BOTH" {
                        value 3;
                    }
                }
            }
            leaf outerElements {
                type uint32;
                default 100000;
                description
                  "Number of elements in the OuterList";
            }
            leaf innerElements {
                type uint32;
                default 1;
                description
                  "Number of elements in the InnerList";
            }
            leaf putsPerTx {
                type uint32;
                default 1;
                description
                  "Number of write operations (PUT, MERGE, or DELETE)
                   per transaction submit";
            }
            leaf listeners {
                type uint32;
                default 0;
                description
                    "Number of data tree change listeners listening for
                    changes on the test exec tree.";
            }
        }
        output {
            leaf status {
                mandatory true;
                type enumeration {
                    enum "OK" {
                        value 1;
                    }
                    enum "FAILED" {
                        value 2;
                    }
                    enum "TEST-IN-PROGRESS" {
                        value 3;
                    }
                }
                description
                    "Indicates whether the test finished successfuly";
            }
            leaf listBuildTime {
                type int64;
                units microseconds;
                description
                  "The time it took to build the list of lists";
            }
            leaf execTime {
                type int64;
                units microseconds;
                description
                  "The time it took to execute all transactions";
            }
            leaf txOk {
                type uint32;
                description
                  "The number of successful transactions";
            }
            leaf txError {
                type uint32;
                description
                  "The number of failed transactions";
            }
            leaf ntfOk {
                type uint32;
                description
                  "The number of successfully received data tree change
{'fraction_non_alphanumeric': 0.048083067092651754, 'fraction_numerical': 0.009744408945686902, 'mean_word_length': 0.6683544303797468, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5775323', 'n_tokens_mistral': 2734, 'n_tokens_neox': 2345, 'n_words': 764}