# -*- coding: utf-8 -*- """ @author: yq @time: 2024/11/1 @desc: """ from data import DataLoaderMysql from entitys import DbConfigEntity from metrics import MetricBySqlGeneral, f_get_metric_clazz_dict if __name__ == "__main__": db_config = DbConfigEntity(host="101.126.81.2", port=18001, user="root", passwd="Cqrcb2024", db="test") data_loader = DataLoaderMysql(db_config) metric_clzz = MetricBySqlGeneral() metric = metric_clzz.calculate(data_loader, "select * from test.t1") print(metric.head(5))