测试pprof
This commit is contained in:
@@ -14,11 +14,14 @@ import (
|
|||||||
"git.rosy.net.cn/jx-callback/business/partner"
|
"git.rosy.net.cn/jx-callback/business/partner"
|
||||||
"git.rosy.net.cn/jx-callback/business/partner/putils"
|
"git.rosy.net.cn/jx-callback/business/partner/putils"
|
||||||
"git.rosy.net.cn/jx-callback/globals"
|
"git.rosy.net.cn/jx-callback/globals"
|
||||||
|
|
||||||
|
_ "net/http/pprof"
|
||||||
|
"net/http"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
enableScheduleRefreshStore = false
|
enableScheduleRefreshStore = false
|
||||||
taskParallelCount = 2
|
taskParallelCount = 4
|
||||||
specialSkuNameKeyWord = "温馨提示"
|
specialSkuNameKeyWord = "温馨提示"
|
||||||
startOpStoreStockNumber = 0
|
startOpStoreStockNumber = 0
|
||||||
endOpStoreStockNumber = model.MaxStoreSkuStockQty
|
endOpStoreStockNumber = model.MaxStoreSkuStockQty
|
||||||
@@ -199,6 +202,9 @@ func GetFilterStoreList(storeList []*cms.StoreExt, vendorMap, storeIDMap map[int
|
|||||||
}
|
}
|
||||||
|
|
||||||
func StartOrEndOpStore(ctx *jxcontext.Context, isStart bool, vendorIDList []int, storeIDList []int, startTime, endTime int16, isAsync, isContinueWhenError bool) (retVal interface{}, err error) {
|
func StartOrEndOpStore(ctx *jxcontext.Context, isStart bool, vendorIDList []int, storeIDList []int, startTime, endTime int16, isAsync, isContinueWhenError bool) (retVal interface{}, err error) {
|
||||||
|
go func() {
|
||||||
|
http.ListenAndServe("127.0.0.1:8086", nil)
|
||||||
|
}()
|
||||||
storeList, err := GetStoreList(ctx)
|
storeList, err := GetStoreList(ctx)
|
||||||
vendorMap := make(map[int]bool)
|
vendorMap := make(map[int]bool)
|
||||||
for _, vendorID := range vendorIDList {
|
for _, vendorID := range vendorIDList {
|
||||||
|
|||||||
Reference in New Issue
Block a user