-
Notifications
You must be signed in to change notification settings - Fork 223
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add metrics to simulator #706
Merged
Merged
Changes from all commits
Commits
Show all changes
76 commits
Select commit
Hold shift + click to select a range
414a7cf
add tps
anusha-ctrl 41f94ec
merge
anusha-ctrl c65a8e7
Merge branch 'master' into add-metrics-to-simulator
anusha-ctrl bf74d46
get block build metrics
anusha-ctrl 0ed532e
Add issuance time, confirmed time, issued-> acceptance time, verify time
anusha-ctrl cedb3b0
Log times at end of batch
anusha-ctrl 461c2c6
cleaner
anusha-ctrl 750ed9f
address comments
anusha-ctrl 5c521d7
remove unused code block
anusha-ctrl 3655c66
avoids taking len of channel
darioush 7b0f663
nits
darioush f225dfb
Merge pull request #707 from ava-labs/add-metrics-to-simulator0
anusha-ctrl be68d42
pass in stringID
anusha-ctrl 173f847
move to loader
anusha-ctrl a3b6020
remove unused field
anusha-ctrl 2fef11e
Merge branch 'master' into add-metrics-to-simulator
anusha-ctrl c8f3da5
revert file back
anusha-ctrl 775e5e9
cleaner
anusha-ctrl ca504d3
lint
anusha-ctrl 7395f60
make it work for ws or for rpc
anusha-ctrl c9b9604
protect
anusha-ctrl 35480f8
endpoint
anusha-ctrl 867b81e
no return on defer
anusha-ctrl 4511cc5
sep to a funciton
anusha-ctrl 616d9c8
have blockchainidstr passed in
anusha-ctrl 131ab7d
Merge branch 'master' into add-metrics-to-simulator
anusha-ctrl 5262218
typo
anusha-ctrl 46d1208
pass in metrics through config
anusha-ctrl 6666a59
address comments
anusha-ctrl c30bf85
address more comments and edit err policy of metrics functions
anusha-ctrl 2048ffa
add more logging to load_test
anusha-ctrl 99e6f27
Merge branch 'master' into add-metrics-to-simulator
anusha-ctrl d7d09ff
typo
anusha-ctrl 875048e
better check
anusha-ctrl cce96a7
Merge branch 'master' into add-metrics-to-simulator
anusha-ctrl 59a2d29
fix endpoints
anusha-ctrl b07cfa9
typo:
anusha-ctrl 710a222
individual
anusha-ctrl d919724
Merge branch 'master' into add-metrics-to-simulator
anusha-ctrl 63731b7
histogram
anusha-ctrl 9821242
address feedback:
anusha-ctrl 2ad7ad3
remove metrics from default
anusha-ctrl 7856705
Merge branch 'master' into add-metrics-to-simulator
anusha-ctrl 649daca
address comments
anusha-ctrl 2ffda7a
simplify time metrics
anusha-ctrl e4fb332
better explanation
anusha-ctrl 8849b75
address comments
anusha-ctrl 8e7bbdc
address comments
anusha-ctrl f7d3850
cleanup
anusha-ctrl c81454e
more cleanup
anusha-ctrl 2fb7c3b
rename vars for clarity
anusha-ctrl 1773e13
ws
anusha-ctrl f3867e5
cleanup
anusha-ctrl 3c4f54a
address comments
anusha-ctrl e918d4d
Merge branch 'master' into add-metrics-to-simulator
anusha-ctrl 14e1d55
ws
anusha-ctrl ee390f5
expose metrics add flag
anusha-ctrl cc51ea9
Merge branch 'master' into add-metrics-to-simulator
anusha-ctrl 2825310
fix blocking issue of http server and gracefully stop it
anusha-ctrl 85cc2f8
cleanup
anusha-ctrl ea1e609
use constant
anusha-ctrl 2651d76
add issuance to confirmation metrics
anusha-ctrl 92bb91f
ws
anusha-ctrl aa464fb
Merge branch 'master' into add-metrics-to-simulator
aaronbuchwald c3d777b
simplify metrics server
anusha-ctrl d049a98
Bump avalanchego to v1.10.5 and bump Subnet-EVM for v0.5.3 release (#…
aaronbuchwald 0fcf0d7
handle control c
anusha-ctrl ebe20cd
print out output
anusha-ctrl 11d4295
clean up
anusha-ctrl 33cbe16
clean up
anusha-ctrl 5c80926
remove go routines to close client
anusha-ctrl 710bed0
address comments
anusha-ctrl e1cf6c3
memory leak
anusha-ctrl 8b87e94
fix
anusha-ctrl a2ff6f9
print
anusha-ctrl d26845c
Merge branch 'master' into add-metrics-to-simulator
anusha-ctrl File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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,42 @@ | ||
// (c) 2023, Ava Labs, Inc. All rights reserved. | ||
// See the file LICENSE for licensing terms. | ||
|
||
package metrics | ||
aaronbuchwald marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
import ( | ||
"github.com/prometheus/client_golang/prometheus" | ||
) | ||
|
||
type Metrics struct { | ||
// Summary of the quantiles of Individual Issuance Tx Times | ||
IssuanceTxTimes prometheus.Summary | ||
// Summary of the quantiles of Individual Confirmation Tx Times | ||
ConfirmationTxTimes prometheus.Summary | ||
// Summary of the quantiles of Individual Issuance To Confirmation Tx Times | ||
IssuanceToConfirmationTxTimes prometheus.Summary | ||
} | ||
|
||
// NewMetrics creates and returns a Metrics and registers it with a Collector | ||
func NewMetrics(reg prometheus.Registerer) *Metrics { | ||
m := &Metrics{ | ||
IssuanceTxTimes: prometheus.NewSummary(prometheus.SummaryOpts{ | ||
Name: "tx_issuance_time", | ||
Help: "Individual Tx Issuance Times for a Load Test", | ||
Objectives: map[float64]float64{0.5: 0.05, 0.9: 0.01, 0.99: 0.001}, | ||
}), | ||
ConfirmationTxTimes: prometheus.NewSummary(prometheus.SummaryOpts{ | ||
Name: "tx_confirmation_time", | ||
Help: "Individual Tx Confirmation Times for a Load Test", | ||
Objectives: map[float64]float64{0.5: 0.05, 0.9: 0.01, 0.99: 0.001}, | ||
}), | ||
IssuanceToConfirmationTxTimes: prometheus.NewSummary(prometheus.SummaryOpts{ | ||
Name: "tx_issuance_to_confirmation_time", | ||
Help: "Individual Tx Issuance To Confirmation Times for a Load Test", | ||
Objectives: map[float64]float64{0.5: 0.05, 0.9: 0.01, 0.99: 0.001}, | ||
}), | ||
} | ||
reg.MustRegister(m.IssuanceTxTimes) | ||
reg.MustRegister(m.ConfirmationTxTimes) | ||
reg.MustRegister(m.IssuanceToConfirmationTxTimes) | ||
return m | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍