def do_throttle(self, *args):
        """
        Set the allowed consumed throughput for DQL.

        # Set the total allowed throughput across all tables
        > throttle 1000 100
        # Set the default allowed throughput per-table/index
        > throttle default 40% 20%
        # Set the allowed throughput on a table
        > throttle mytable 10 10
        # Set the allowed throughput on a global index
        > throttle mytable myindex 40 6

        see also: unthrottle

        """
        args = list(args)
        if not args:
            print(self.throttle)
            return
        if len(args) < 2:
            return self.onecmd("help throttle")
        args, read, write = args[:-2], args[-2], args[-1]
        if len(args) == 2:
            tablename, indexname = args
            self.throttle.set_index_limit(tablename, indexname, read, write)
        elif len(args) == 1:
            tablename = args[0]
            if tablename == "default":
                self.throttle.set_default_limit(read, write)
            elif tablename == "total":
                self.throttle.set_total_limit(read, write)
            else:
                self.throttle.set_table_limit(tablename, read, write)
        elif not args:
            self.throttle.set_total_limit(read, write)
        else:
            return self.onecmd("help throttle")
        self.conf["_throttle"] = self.throttle.save()
        self.save_config()
def do_throttle ( self , * args ) : args = list ( args ) if not args : print ( self . throttle ) return if len ( args ) < 2 : return self . onecmd ( "help throttle" ) args , read , write = args [ : - 2 ] , args [ - 2 ] , args [ - 1 ] if len ( args ) == 2 : tablename , indexname = args self . throttle . set_index_limit ( tablename , indexname , read , write ) elif len ( args ) == 1 : tablename = args [ 0 ] if tablename == "default" : self . throttle . set_default_limit ( read , write ) elif tablename == "total" : self . throttle . set_total_limit ( read , write ) else : self . throttle . set_table_limit ( tablename , read , write ) elif not args : self . throttle . set_total_limit ( read , write ) else : return self . onecmd ( "help throttle" ) self . conf [ "_throttle" ] = self . throttle . save ( ) self . save_config ( )
Set the allowed consumed throughput for DQL.

        # Set the total allowed throughput across all tables
        > throttle 1000 100
        # Set the default allowed throughput per-table/index
        > throttle default 40% 20%
        # Set the allowed throughput on a table
        > throttle mytable 10 10
        # Set the allowed throughput on a global index
        > throttle mytable myindex 40 6

        see also: unthrottle