Documentation
¶
Index ¶
Constants ¶
View Source
const ( WilsonLHRRAlgorithm = "wilsonLHRR" WilsonLHRRFluidAlgorithm = "wilsonLHRRFluid" OriginAlgorithm = "origin" LikeDescAlgorithm = "likeDesc" StateInactive = int(0) StateActive = int(1) SlotsNum = 100 DefaultSlotName = "default" DefaultAlgorithm = "default" DefaultWeight = "" )
const var
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SSDateRes ¶
type SSDateRes struct { Legend []string `json:"legend"` XAxis []int `json:"x_axis"` Series map[string][]*StatisticsStat `json:"series"` }
SSDateRes ss res
type SSHourRes ¶
type SSHourRes struct { Legend []string `json:"legend"` XAxis []string `json:"x_axis"` Series map[string][]*StatisticsStat `json:"series"` }
SSHourRes ss res
type SSReq ¶
type SSReq struct { DateFrom int64 `form:"date_from" validate:"required"` DateEnd int64 `form:"date_end" validate:"required"` Hour bool `form:"hour"` }
SSReq ss req
type SlotsMapping ¶
SlotsMapping slot name mapping
type StatisticsStat ¶
type StatisticsStat struct { // 流量所属槽位 0~99 Slot int // 所属实验组名 Name string State int Date int Hour int HotLike int64 HotHate int64 HotReport int64 HotChildReply int64 // 整个评论区 TotalLike int64 TotalHate int64 TotalReport int64 TotalChildReply int64 TotalRootReply int64 // 用户点开评论区次数 View uint32 // 评论列表接口调用次数 TotalView uint32 // 热门评论接口调用次数 HotView uint32 // 更多热门评论点击次数 HotClick uint32 // UV的统计数据 HotLikeUV int64 HotHateUV int64 HotReportUV int64 HotChildUV int64 TotalLikeUV int64 TotalHateUV int64 TotalReportUV int64 TotalChildUV int64 TotalRootUV int64 }
StatisticsStat 实验组或者对照组的各项统计
func (*StatisticsStat) DivideByPercent ¶
func (stat1 *StatisticsStat) DivideByPercent(percent int64) (stat2 *StatisticsStat)
DivideByPercent ...
func (*StatisticsStat) Merge ¶
func (stat1 *StatisticsStat) Merge(stat2 *StatisticsStat) (stat3 *StatisticsStat)
Merge Merge
func (*StatisticsStat) MergeByDate ¶
func (stat1 *StatisticsStat) MergeByDate(stat2 *StatisticsStat) (stat3 *StatisticsStat)
MergeByDate MergeByDate
type StatisticsStats ¶
type StatisticsStats []*StatisticsStat
StatisticsStats StatisticsStats
func (StatisticsStats) GroupByName ¶
func (s StatisticsStats) GroupByName() (res map[string]StatisticsStats)
GroupByName group statistics by name
type WilsonLHRRFluidWeight ¶
type WilsonLHRRFluidWeight struct { Like float64 `json:"like"` Hate float64 `json:"hate"` Reply float64 `json:"reply"` Report float64 `json:"report"` Slope float64 `json:"slope"` }
WilsonLHRRFluidWeight WilsonLHRRFluidWeight
func (WilsonLHRRFluidWeight) Validate ¶
func (weight WilsonLHRRFluidWeight) Validate() (err error)
Validate Validate
type WilsonLHRRWeight ¶
type WilsonLHRRWeight struct { Like float64 `json:"like"` Hate float64 `json:"hate"` Reply float64 `json:"reply"` Report float64 `json:"report"` }
WilsonLHRRWeight wilson score interval weight
func (WilsonLHRRWeight) Validate ¶
func (weight WilsonLHRRWeight) Validate() (err error)
Validate Validate
Click to show internal directories.
Click to hide internal directories.