-
-
Notifications
You must be signed in to change notification settings - Fork 293
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1710 from c9s/c9s/xmaker/stb-improvements
IMPROVE: [xmaker] improve stability
- Loading branch information
Showing
20 changed files
with
204 additions
and
87 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
pkg/priceresolver/simple_test.go → pkg/pricesolver/simple_test.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package priceresolver | ||
package pricesolver | ||
|
||
import ( | ||
"testing" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package xmaker | ||
|
||
import "github.com/prometheus/client_golang/prometheus" | ||
|
||
var openOrderBidExposureInUsdMetrics = prometheus.NewGaugeVec( | ||
prometheus.GaugeOpts{ | ||
Name: "xmaker_open_order_bid_exposure_in_usd", | ||
Help: "", | ||
}, []string{"strategy_type", "strategy_id", "exchange", "symbol"}) | ||
|
||
var openOrderAskExposureInUsdMetrics = prometheus.NewGaugeVec( | ||
prometheus.GaugeOpts{ | ||
Name: "xmaker_open_order_ask_exposure_in_usd", | ||
Help: "", | ||
}, []string{"strategy_type", "strategy_id", "exchange", "symbol"}) | ||
|
||
var makerBestBidPriceMetrics = prometheus.NewGaugeVec( | ||
prometheus.GaugeOpts{ | ||
Name: "xmaker_maker_best_bid_price", | ||
Help: "", | ||
}, []string{"strategy_type", "strategy_id", "exchange", "symbol"}) | ||
|
||
var makerBestAskPriceMetrics = prometheus.NewGaugeVec( | ||
prometheus.GaugeOpts{ | ||
Name: "xmaker_maker_best_ask_price", | ||
Help: "", | ||
}, []string{"strategy_type", "strategy_id", "exchange", "symbol"}) | ||
|
||
var numOfLayersMetrics = prometheus.NewGaugeVec( | ||
prometheus.GaugeOpts{ | ||
Name: "xmaker_num_of_layers", | ||
Help: "", | ||
}, []string{"strategy_type", "strategy_id", "exchange", "symbol"}) | ||
|
||
func init() { | ||
prometheus.MustRegister( | ||
openOrderBidExposureInUsdMetrics, | ||
openOrderAskExposureInUsdMetrics, | ||
makerBestBidPriceMetrics, | ||
makerBestAskPriceMetrics, | ||
numOfLayersMetrics, | ||
) | ||
} |
Oops, something went wrong.