-
Notifications
You must be signed in to change notification settings - Fork 94
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
Added benchmarking for rosetta server endpoints through check:perf co… #310
Conversation
340c7ce
to
6e5e628
Compare
pkg/results/perf_results.go
Outdated
@@ -0,0 +1,157 @@ | |||
// Copyright 2020 Coinbase, Inc. |
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.
Reminder to change the copyrights for all the files created or updated to 2022.
pkg/results/perf_results.go
Outdated
table.Append([]string{"Start Block", "Start Block", strconv.FormatInt(c.StartBlock, 10)}) | ||
table.Append([]string{"End Block", "EndBlock", strconv.FormatInt(c.EndBlock, 10)}) |
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.
It may be better for the descriptions to be "The starting block." and "The ending block." If anything, at least "EndBlock" should be "End Block", to match the formatting in line 67. (Unless it's meant to match the stat names like in line 50).
table.Append([]string{"Start Block", "Start Block", strconv.FormatInt(c.StartBlock, 10)}) | |
table.Append([]string{"End Block", "EndBlock", strconv.FormatInt(c.EndBlock, 10)}) | |
table.Append([]string{"Start Block", "Start Block", strconv.FormatInt(c.StartBlock, 10)}) | |
table.Append([]string{"End Block", "End Block", strconv.FormatInt(c.EndBlock, 10)}) |
cmd/check_perf.go
Outdated
Long: `This command can be used to benchmark the performance of time critical methods for a rosetta server. | ||
This is useful for ensuring that there are no performance degradations in the rosetta-server.`, |
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.
The branding for Rosetta that I've seen so far capitalizes the first letter of the name. Is there a particular reason why it's in lowercase here? Is 'rosetta' a reference to the type of server and not to the API?
Also please correct the Long value to the below strings:
Long: `This command can be used to benchmark the performance of time critical methods for a rosetta server. | |
This is useful for ensuring that there are no performance degradations in the rosetta-server.`, | |
Long: `This command can be used to benchmark the performance of time-critical methods for a rosetta server. | |
This is useful for ensuring that there are no performance degradations in the rosetta-server.`, |
Also not sure why rosetta-server
is hyphenated there but not the sentence above? (It should not be hyphenated in either case.)
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.
Made the requested changes!
rosetta => Rosetta
rosetta-server => Rosetta server
|
||
import "time" | ||
|
||
func timerFactory() func() time.Duration { |
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.
Here we use camelCase but in data_perf.go we use underscore _ for function name. Can we make them uniform?
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.
I changed to camelCase in data_perf.go
Review Error for shiatcb @ 2022-05-11 17:20:30 UTC |
…mmand Signed-off-by: raghavapamula <[email protected]> Addressed Review Commments from Madhur and Rosie Signed-off-by: raghavapamula <[email protected]>
Benchmarking for /Block and /Account/Balance endpoints
Motivation
To prevent performance degradations in Rosetta Servers