@@ -74,38 +74,38 @@ func (app *appConnConsensus) Error() error {
74
74
}
75
75
76
76
func (app * appConnConsensus ) InitChain (ctx context.Context , req * types.RequestInitChain ) (* types.ResponseInitChain , error ) {
77
- defer addTimeSample (app .metrics .MethodTimingSeconds .With ("method" , "init_chain" ))()
77
+ defer addTimeSample (app .metrics .MethodTimingSeconds .With ("method" , "init_chain" , "type" , "sync" ))()
78
78
return app .appConn .InitChain (ctx , req )
79
79
}
80
80
81
81
func (app * appConnConsensus ) PrepareProposal (ctx context.Context ,
82
82
req * types.RequestPrepareProposal ) (* types.ResponsePrepareProposal , error ) {
83
- defer addTimeSample (app .metrics .MethodTimingSeconds .With ("method" , "prepare_proposal" ))()
83
+ defer addTimeSample (app .metrics .MethodTimingSeconds .With ("method" , "prepare_proposal" , "type" , "sync" ))()
84
84
return app .appConn .PrepareProposal (ctx , req )
85
85
}
86
86
87
87
func (app * appConnConsensus ) ProcessProposal (ctx context.Context , req * types.RequestProcessProposal ) (* types.ResponseProcessProposal , error ) {
88
- defer addTimeSample (app .metrics .MethodTimingSeconds .With ("method" , "process_proposal" ))()
88
+ defer addTimeSample (app .metrics .MethodTimingSeconds .With ("method" , "process_proposal" , "type" , "sync" ))()
89
89
return app .appConn .ProcessProposal (ctx , req )
90
90
}
91
91
92
92
func (app * appConnConsensus ) ExtendVote (ctx context.Context , req * types.RequestExtendVote ) (* types.ResponseExtendVote , error ) {
93
- defer addTimeSample (app .metrics .MethodTimingSeconds .With ("method" , "extend_vote" ))()
93
+ defer addTimeSample (app .metrics .MethodTimingSeconds .With ("method" , "extend_vote" , "type" , "sync" ))()
94
94
return app .appConn .ExtendVote (ctx , req )
95
95
}
96
96
97
97
func (app * appConnConsensus ) VerifyVoteExtension (ctx context.Context , req * types.RequestVerifyVoteExtension ) (* types.ResponseVerifyVoteExtension , error ) {
98
- defer addTimeSample (app .metrics .MethodTimingSeconds .With ("method" , "verify_vote_extension" ))()
98
+ defer addTimeSample (app .metrics .MethodTimingSeconds .With ("method" , "verify_vote_extension" , "type" , "sync" ))()
99
99
return app .appConn .VerifyVoteExtension (ctx , req )
100
100
}
101
101
102
102
func (app * appConnConsensus ) FinalizeBlock (ctx context.Context , req * types.RequestFinalizeBlock ) (* types.ResponseFinalizeBlock , error ) {
103
- defer addTimeSample (app .metrics .MethodTimingSeconds .With ("method" , "finalize_block" ))()
103
+ defer addTimeSample (app .metrics .MethodTimingSeconds .With ("method" , "finalize_block" , "type" , "sync" ))()
104
104
return app .appConn .FinalizeBlock (ctx , req )
105
105
}
106
106
107
107
func (app * appConnConsensus ) Commit (ctx context.Context ) (* types.ResponseCommit , error ) {
108
- defer addTimeSample (app .metrics .MethodTimingSeconds .With ("method" , "commit" ))()
108
+ defer addTimeSample (app .metrics .MethodTimingSeconds .With ("method" , "commit" , "type" , "sync" ))()
109
109
return app .appConn .Commit (ctx , & types.RequestCommit {})
110
110
}
111
111
@@ -133,7 +133,7 @@ func (app *appConnMempool) Error() error {
133
133
}
134
134
135
135
func (app * appConnMempool ) Flush (ctx context.Context ) error {
136
- defer addTimeSample (app .metrics .MethodTimingSeconds .With ("method" , "flush" ))()
136
+ defer addTimeSample (app .metrics .MethodTimingSeconds .With ("method" , "flush" , "type" , "sync" ))()
137
137
return app .appConn .Flush (ctx )
138
138
}
139
139
@@ -167,17 +167,17 @@ func (app *appConnQuery) Error() error {
167
167
}
168
168
169
169
func (app * appConnQuery ) Echo (ctx context.Context , msg string ) (* types.ResponseEcho , error ) {
170
- defer addTimeSample (app .metrics .MethodTimingSeconds .With ("method" , "echo" ))()
170
+ defer addTimeSample (app .metrics .MethodTimingSeconds .With ("method" , "echo" , "type" , "sync" ))()
171
171
return app .appConn .Echo (ctx , msg )
172
172
}
173
173
174
174
func (app * appConnQuery ) Info (ctx context.Context , req * types.RequestInfo ) (* types.ResponseInfo , error ) {
175
- defer addTimeSample (app .metrics .MethodTimingSeconds .With ("method" , "info" ))()
175
+ defer addTimeSample (app .metrics .MethodTimingSeconds .With ("method" , "info" , "type" , "sync" ))()
176
176
return app .appConn .Info (ctx , req )
177
177
}
178
178
179
179
func (app * appConnQuery ) Query (ctx context.Context , req * types.RequestQuery ) (* types.ResponseQuery , error ) {
180
- defer addTimeSample (app .metrics .MethodTimingSeconds .With ("method" , "query" ))()
180
+ defer addTimeSample (app .metrics .MethodTimingSeconds .With ("method" , "query" , "type" , "sync" ))()
181
181
return app .appConn .Query (ctx , req )
182
182
}
183
183
@@ -201,22 +201,22 @@ func (app *appConnSnapshot) Error() error {
201
201
}
202
202
203
203
func (app * appConnSnapshot ) ListSnapshots (ctx context.Context , req * types.RequestListSnapshots ) (* types.ResponseListSnapshots , error ) {
204
- defer addTimeSample (app .metrics .MethodTimingSeconds .With ("method" , "list_snapshots" ))()
204
+ defer addTimeSample (app .metrics .MethodTimingSeconds .With ("method" , "list_snapshots" , "type" , "sync" ))()
205
205
return app .appConn .ListSnapshots (ctx , req )
206
206
}
207
207
208
208
func (app * appConnSnapshot ) OfferSnapshot (ctx context.Context , req * types.RequestOfferSnapshot ) (* types.ResponseOfferSnapshot , error ) {
209
- defer addTimeSample (app .metrics .MethodTimingSeconds .With ("method" , "offer_snapshot" ))()
209
+ defer addTimeSample (app .metrics .MethodTimingSeconds .With ("method" , "offer_snapshot" , "type" , "sync" ))()
210
210
return app .appConn .OfferSnapshot (ctx , req )
211
211
}
212
212
213
213
func (app * appConnSnapshot ) LoadSnapshotChunk (ctx context.Context , req * types.RequestLoadSnapshotChunk ) (* types.ResponseLoadSnapshotChunk , error ) {
214
- defer addTimeSample (app .metrics .MethodTimingSeconds .With ("method" , "load_snapshot_chunk" ))()
214
+ defer addTimeSample (app .metrics .MethodTimingSeconds .With ("method" , "load_snapshot_chunk" , "type" , "sync" ))()
215
215
return app .appConn .LoadSnapshotChunk (ctx , req )
216
216
}
217
217
218
218
func (app * appConnSnapshot ) ApplySnapshotChunk (ctx context.Context , req * types.RequestApplySnapshotChunk ) (* types.ResponseApplySnapshotChunk , error ) {
219
- defer addTimeSample (app .metrics .MethodTimingSeconds .With ("method" , "apply_snapshot_chunk" ))()
219
+ defer addTimeSample (app .metrics .MethodTimingSeconds .With ("method" , "apply_snapshot_chunk" , "type" , "sync" ))()
220
220
return app .appConn .ApplySnapshotChunk (ctx , req )
221
221
}
222
222
0 commit comments