mirror of
				https://github.com/TeaOSLab/EdgeAPI.git
				synced 2025-11-04 16:00:24 +08:00 
			
		
		
		
	增加API方法调用耗时统计
This commit is contained in:
		
							
								
								
									
										28
									
								
								internal/db/models/api_method_stat_model.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								internal/db/models/api_method_stat_model.go
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,28 @@
 | 
			
		||||
package models
 | 
			
		||||
 | 
			
		||||
// APIMethodStat API方法统计
 | 
			
		||||
type APIMethodStat struct {
 | 
			
		||||
	Id         uint64  `field:"id"`         // ID
 | 
			
		||||
	ApiNodeId  uint32  `field:"apiNodeId"`  // API节点ID
 | 
			
		||||
	Method     string  `field:"method"`     // 方法
 | 
			
		||||
	Tag        string  `field:"tag"`        // 标签方法
 | 
			
		||||
	CostMs     float64 `field:"costMs"`     // 耗时Ms
 | 
			
		||||
	PeekMs     float64 `field:"peekMs"`     // 峰值耗时
 | 
			
		||||
	CountCalls uint64  `field:"countCalls"` // 调用次数
 | 
			
		||||
	Day        string  `field:"day"`        // 日期
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
type APIMethodStatOperator struct {
 | 
			
		||||
	Id         interface{} // ID
 | 
			
		||||
	ApiNodeId  interface{} // API节点ID
 | 
			
		||||
	Method     interface{} // 方法
 | 
			
		||||
	Tag        interface{} // 标签方法
 | 
			
		||||
	CostMs     interface{} // 耗时Ms
 | 
			
		||||
	PeekMs     interface{} // 峰值耗时
 | 
			
		||||
	CountCalls interface{} // 调用次数
 | 
			
		||||
	Day        interface{} // 日期
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func NewAPIMethodStatOperator() *APIMethodStatOperator {
 | 
			
		||||
	return &APIMethodStatOperator{}
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user