def test_benchmark(self):
        c = BaseClient()
        body = '''{
            "name": "my_benchmark",
            "competitors": [ {
                "name": "my_competitor",
                "requests": [ {
                    "query": {
                        "match": { "_all": "a*" }
                    }
                } ]
             } ]
        }

        '''
        c.benchmark(
            body     = body,
            index    = 'index',
            doc_type = 'index',
            cb       = self.handle_cb,
        )
        self.wait()
Esempio n. 2
0
    def test_benchmark(self):
        c = BaseClient()
        body = '''{
            "name": "my_benchmark",
            "competitors": [ {
                "name": "my_competitor",
                "requests": [ {
                    "query": {
                        "match": { "_all": "a*" }
                    }
                } ]
             } ]
        }

        '''
        c.benchmark(
            body     = body,
            index    = 'index',
            doc_type = 'index',
            callback = self.handle_cb,
        )
        self.wait()