Skip to content

Commit

Permalink
added more response time metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
ice-ares committed Mar 25, 2023
1 parent 51d64e9 commit 7bc1650
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 7 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ require (
github.com/goccy/go-json v0.10.2
github.com/google/uuid v1.3.0
github.com/hashicorp/go-multierror v1.1.1
github.com/ice-blockchain/eskimo v1.101.0
github.com/ice-blockchain/eskimo v1.103.0
github.com/ice-blockchain/go-tarantool-client v0.0.0-20230322193140-81ac2079df0c
github.com/ice-blockchain/wintr v1.101.0
github.com/pkg/errors v0.9.1
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,8 @@ github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
github.com/ice-blockchain/eskimo v1.101.0 h1:ONIieQZCJcRdxEuNFS9DXYbp2Gs0bqX6YutACtLErjo=
github.com/ice-blockchain/eskimo v1.101.0/go.mod h1:OXEZa2wIbWWofnH0FFa2Za/oEBS9h48QWj6nVJF/JL0=
github.com/ice-blockchain/eskimo v1.103.0 h1:Q8b5udJLYjyKBre4whunpLiWTSQvr0S2Gp0szTcvlAY=
github.com/ice-blockchain/eskimo v1.103.0/go.mod h1:gFqV1dqTJsGRAAwPWi0h2/s/HYo8zRYxLOynbTAXQq0=
github.com/ice-blockchain/go-tarantool-client v0.0.0-20230322193140-81ac2079df0c h1:c0fZ+DTu1zlEggEGckFzdGx0tuWQDPf4PjfAbQkHFAU=
github.com/ice-blockchain/go-tarantool-client v0.0.0-20230322193140-81ac2079df0c/go.mod h1:ZsQU7i3mxhgBBu43Oev7WPFbIjP4TniN/b1UPNGbrq8=
github.com/ice-blockchain/wintr v1.101.0 h1:84dJ+1TnlU4jLPnGO/om2BgigvOXhQhxDDNX1lGh/MY=
Expand Down
4 changes: 4 additions & 0 deletions tokenomics/balance_recalculation.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ func (s *balanceRecalculationTriggerStreamSource) Process(ignoredCtx context.Con
if ignoredCtx.Err() != nil {
return errors.Wrap(ignoredCtx.Err(), "unexpected deadline while processing message")
}
before2 := time.Now()
defer func() {
log.Info(fmt.Sprintf("[response]balanceRecalculationTriggerStreamSource.Process[%v] took: %v", uint64(msg.Partition), stdlibtime.Since(*before2.Time)))
}()
const deadline = 5 * stdlibtime.Minute
ctx, cancel := context.WithTimeout(context.Background(), deadline)
defer cancel()
Expand Down
4 changes: 4 additions & 0 deletions tokenomics/blockchain_balance_synchronization.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ func (s *blockchainBalanceSynchronizationTriggerStreamSource) Process(ignoredCtx
if ignoredCtx.Err() != nil {
return errors.Wrap(ignoredCtx.Err(), "unexpected deadline while processing message")
}
before2 := time.Now()
defer func() {
log.Info(fmt.Sprintf("[response]blockchainBalanceSynchronizationTriggerStreamSource.Process[%v] took: %v", uint64(msg.Partition), stdlibtime.Since(*before2.Time)))
}()
const deadline = 5 * stdlibtime.Minute
ctx, cancel := context.WithTimeout(context.Background(), deadline)
defer cancel()
Expand Down
8 changes: 4 additions & 4 deletions tokenomics/contract.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,10 +208,10 @@ const (
balanceRecalculationBatchSize = 100
extraBonusProcessingBatchSize = 500
maxICEBlockchainConcurrentOperations = 100000
balanceCalculationProcessingSeedingStreamEmitFrequency = 300 * stdlibtime.Second
refreshMiningRatesProcessingSeedingStreamEmitFrequency = 300 * stdlibtime.Second
blockchainBalanceSynchronizationSeedingStreamEmitFrequency = 300 * stdlibtime.Second
extraBonusProcessingSeedingStreamEmitFrequency = 300 * stdlibtime.Second
balanceCalculationProcessingSeedingStreamEmitFrequency = 3 * stdlibtime.Second
refreshMiningRatesProcessingSeedingStreamEmitFrequency = 3 * stdlibtime.Second
blockchainBalanceSynchronizationSeedingStreamEmitFrequency = 3 * stdlibtime.Second
extraBonusProcessingSeedingStreamEmitFrequency = 3 * stdlibtime.Second
requestDeadline = 25 * stdlibtime.Second
)

Expand Down
4 changes: 4 additions & 0 deletions tokenomics/extra_bonus_processing.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ func (s *extraBonusProcessingTriggerStreamSource) Process(ignoredCtx context.Con
if ignoredCtx.Err() != nil {
return errors.Wrap(ignoredCtx.Err(), "unexpected deadline while processing message")
}
before2 := time.Now()
defer func() {
log.Info(fmt.Sprintf("[response]extraBonusProcessingTriggerStreamSource.Process[%v] took: %v", uint64(msg.Partition), stdlibtime.Since(*before2.Time)))
}()
const deadline = 5 * stdlibtime.Minute
ctx, cancel := context.WithTimeout(context.Background(), deadline)
defer cancel()
Expand Down
4 changes: 4 additions & 0 deletions tokenomics/mining_rates_recalculation.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ func (s *miningRatesRecalculationTriggerStreamSource) Process(ignoredCtx context
if ignoredCtx.Err() != nil {
return errors.Wrap(ignoredCtx.Err(), "unexpected deadline while processing message")
}
before2 := time.Now()
defer func() {
log.Info(fmt.Sprintf("[response]miningRatesRecalculationTriggerStreamSource.Process[%v] took: %v", uint64(msg.Partition), stdlibtime.Since(*before2.Time)))
}()
const deadline = 5 * stdlibtime.Minute
ctx, cancel := context.WithTimeout(context.Background(), deadline)
defer cancel()
Expand Down

0 comments on commit 7bc1650

Please sign in to comment.