tests/mysql_collector_test.py
def expected_default_result(self) -> Dict[str, Any]:
        """
        The expected default format of the metrics dictionary based on the data above
        (assuming mysql > 8.0 and that there is master and replica status information)
        """
        return {
            "global": {
                # pyre-ignore[16] we know first element is string
                "global": {x[0].lower(): x[1] for x in self.global_status},
                "innodb_metrics": {"trx_rw_commits": 0},
                "engine": {
                    "innodb_status": "cluster_node_id=7",
                    "master_status": json.dumps(
                        {
                            "Position": 1307,
                            "Binlog_Do_DB": "test",
                        }
                    ),
                    "replica_status": json.dumps(
                        {"Source_Host": "localhost", "Connect_Retry": 60}
                    ),
                },
                "derived": {
                    "buffer_miss_ratio": 25.0,
                    "read_write_ratio": 0.25,
                },
                "performance_schema": {
                    "events_statements_summary_by_digest": json.dumps(
                        [
                            {
                                "queryid": "abc",
                                "calls": 10,
                                "avg_time_ms": 1.5
                            }
                        ]
                    ),
                    "events_statements_histogram_global": json.dumps(
                        [
                            {
                                "bucket_number": 2,
                                "bucket_timer_low": 1,
                                "bucket_timer_high": 5,
                                "count_bucket": 3,
                                "count_bucket_and_lower": 1,
                                "bucket_quantile": 0.0588,
                            }
                        ]
                    )
                },
            },
            "local": None,
        }

        The expected default format of the metrics dictionary based on the data above
        (assuming mysql > 8.0 and that there is master and replica status information)
        
The expected default format of the metrics dictionary based on the data above
(assuming mysql > 8.0 and that there is master and replica status information)
The expected default format of the metrics dictionary based on the data above ( assuming mysql > 8 . 0 and that there is master and replica status information )
def expected_default_result(self) -> Dict[str, Any]:
        return {
            "global": {
                "global": {x[0].lower(): x[1] for x in self.global_status},
                "innodb_metrics": {"trx_rw_commits": 0},
                "engine": {
                    "innodb_status": "cluster_node_id=7",
                    "master_status": json.dumps(
                        {
                            "Position": 1307,
                            "Binlog_Do_DB": "test",
                        }
                    ),
                    "replica_status": json.dumps(
                        {"Source_Host": "localhost", "Connect_Retry": 60}
                    ),
                },
                "derived": {
                    "buffer_miss_ratio": 25.0,
                    "read_write_ratio": 0.25,
                },
                "performance_schema": {
                    "events_statements_summary_by_digest": json.dumps(
                        [
                            {
                                "queryid": "abc",
                                "calls": 10,
                                "avg_time_ms": 1.5
                            }
                        ]
                    ),
                    "events_statements_histogram_global": json.dumps(
                        [
                            {
                                "bucket_number": 2,
                                "bucket_timer_low": 1,
                                "bucket_timer_high": 5,
                                "count_bucket": 3,
                                "count_bucket_and_lower": 1,
                                "bucket_quantile": 0.0588,
                            }
                        ]
                    )
                },
            },
            "local": None,
        }
def expected_default_result ( self ) -> Dict [ str , Any ] : return { "global" : { "global" : { x [ 0 ] . lower ( ) : x [ 1 ] for x in self . global_status } , "innodb_metrics" : { "trx_rw_commits" : 0 } , "engine" : { "innodb_status" : "cluster_node_id=7" , "master_status" : json . dumps ( { "Position" : 1307 , "Binlog_Do_DB" : "test" , } ) , "replica_status" : json . dumps ( { "Source_Host" : "localhost" , "Connect_Retry" : 60 } ) , } , "derived" : { "buffer_miss_ratio" : 25.0 , "read_write_ratio" : 0.25 , } , "performance_schema" : { "events_statements_summary_by_digest" : json . dumps ( [ { "queryid" : "abc" , "calls" : 10 , "avg_time_ms" : 1.5 } ] ) , "events_statements_histogram_global" : json . dumps ( [ { "bucket_number" : 2 , "bucket_timer_low" : 1 , "bucket_timer_high" : 5 , "count_bucket" : 3 , "count_bucket_and_lower" : 1 , "bucket_quantile" : 0.0588 , } ] ) } , } , "local" : None , }
The expected default format of the metrics dictionary based on the data above
(assuming mysql > 8.0 and that there is master and replica status information)
The expected default format of the metrics dictionary based on the data above ( assuming mysql > 8 . 0 and that there is master and replica status information )
"""
        The expected default format of the metrics dictionary based on the data above
        (assuming mysql > 8.0 and that there is master and replica status information)
        """ # pyre-ignore[16] we know first element is string
self