rank.go 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. package model
  2. //Rank rank
  3. type Rank struct {
  4. Duration int `json:"duration" form:"duration"`
  5. TimeDegree string `json:"time_degree" form:"time_degree"`
  6. StartTime string `json:"start_time" form:"start_time"`
  7. EndTime string `json:"end_time" form:"end_time"`
  8. SearchAll bool `json:"search_all" form:"search_all"`
  9. }
  10. //Tree node in service tree
  11. type Tree struct {
  12. Department string `json:"department" form:"department"`
  13. Project string `json:"project" form:"project"`
  14. App string `json:"app" form:"app"`
  15. }
  16. //TreeNum model for department, project and app performance test count statistic
  17. type TreeNum struct {
  18. DeptNum int `json:"dept_num" form:"dept_num"`
  19. ProNum int `json:"pro_num" form:"pro_num"`
  20. AppNum int `json:"app_num" form:"app_num"`
  21. }
  22. //TreeList tree list
  23. type TreeList struct {
  24. TreeList []*Tree `json:"tree_list"`
  25. }
  26. //NumList num list
  27. type NumList struct {
  28. NumList TreeNum `json:"num"`
  29. }
  30. //API api
  31. type API struct {
  32. URL string `json:"url" form:"url"`
  33. Count int `json:"count" form:"count"`
  34. }
  35. // GrpcInfo Grpc Info
  36. type GrpcInfo struct {
  37. ServiceName string `json:"service_name" form:"service_name"`
  38. RequestMethod string `json:"request_method" form:"request_method"`
  39. Count int `json:"count" form:"count"`
  40. }
  41. // GrpcRes Grpc Res
  42. type GrpcRes struct {
  43. GrpcList []*GrpcInfo `json:"grpc_list" form:"grpc_list"`
  44. }
  45. // SceneCount Scene Count
  46. type SceneCount struct {
  47. Department string `json:"department" form:"department"`
  48. SceneName string `json:"scene_name" form:"scene_name"`
  49. Count int `json:"count" form:"count"`
  50. }
  51. // SceneRes SceneRes
  52. type SceneRes struct {
  53. SceneList []*SceneCount `json:"scene_list" form:"scene_list"`
  54. }
  55. //Department department
  56. type Department struct {
  57. Department string `json:"department" form:"department"`
  58. Count int `json:"count" form:"count"`
  59. }
  60. //Build performance test count by date
  61. type Build struct {
  62. Date string `json:"date" form:"date"`
  63. Count int `json:"count" form:"count"`
  64. }
  65. //State model for test status
  66. type State struct {
  67. TestStatus int `json:"test_status" form:"test_status"`
  68. Count int `json:"count" form:"count"`
  69. }
  70. //TopAPIRes performance test top apis
  71. type TopAPIRes struct {
  72. //Total int `json:"total"`
  73. APIList []*API `json:"api_list"`
  74. }
  75. //TopDeptRes performance test top departments
  76. type TopDeptRes struct {
  77. DeptList []*Department `json:"dept_list"`
  78. }
  79. //BuildLineRes test line
  80. type BuildLineRes struct {
  81. BuildList []*Build `json:"build_list"`
  82. }
  83. //StateLineRes test state chart
  84. type StateLineRes struct {
  85. StateList []*State `json:"state_list"`
  86. }