mirror of
				https://github.com/TeaOSLab/EdgeAPI.git
				synced 2025-11-04 16:00:24 +08:00 
			
		
		
		
	增加内置的统计指标
This commit is contained in:
		@@ -17,3 +17,21 @@ func TestSQLExecutor_Run(t *testing.T) {
 | 
			
		||||
	}
 | 
			
		||||
	t.Log("ok")
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func TestSQLExecutor_checkMetricItems(t *testing.T) {
 | 
			
		||||
	executor := NewSQLExecutor(&dbs.DBConfig{
 | 
			
		||||
		Driver: "mysql",
 | 
			
		||||
		Prefix: "edge",
 | 
			
		||||
		Dsn:    "root:123456@tcp(127.0.0.1:3306)/db_edge_new?charset=utf8mb4&multiStatements=true",
 | 
			
		||||
	})
 | 
			
		||||
	db, err := dbs.NewInstanceFromConfig(executor.dbConfig)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		t.Fatal(err)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	err = executor.checkMetricItems(db)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		t.Fatal(err)
 | 
			
		||||
	}
 | 
			
		||||
	t.Log("ok")
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user