Skip to content
This repository was archived by the owner on Jul 31, 2025. It is now read-only.

Mock server and benchmarking memory/cpu usage - #541

Merged
xibz merged 1 commit into
aws:masterfrom
xibz:profiling_clean_history
Feb 5, 2016
Merged

xibz merged 1 commit into
aws:masterfrom
xibz:profiling_clean_history

Conversation

@xibz

@xibz xibz commented Feb 5, 2016

Copy link
Copy Markdown
Contributor

example:
make performance region=us-west-2 table=gosdkbenchmarks log-detailed=true

Comment thread awstesting/mock/server.go Outdated
)

const (
filepath = "./awstesting/mock/mock_data.json"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this still needed since there is no longer any mock data?

@xibz
xibz force-pushed the profiling_clean_history branch from 5c83a99 to efc01a2 Compare February 5, 2016 21:54
// mapCreateClients allows for the creation of clients
func mapCreateClients() {
World["services"] = []func(){
func() { acm.New(mock.Session) },

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this list of services can be simplified. Also I suggest the list of services be in their own file with nothing else so the file which searches through the services is easier to read.

Unless this list is generated it will be easy to forget to add new services to this list when they are released. Even more so if SDK were to ever support versioning of services.

If a []reflect.Value of each service client's New func pointer value was created. Both creation of service client, and inspection of service client's operations could easily be done in the same method by iterating over the items in the list instead of hard coding each service client type buildAnArrayOfClients()

e.g:

var clients = []reflect.Value{
    reflect.ValueOf(acm.New),
    reflect.ValueOf(apigateway.New),
}
//...
for i, c := range clients {
    v := c.Call([]reflect.Value{reflect.ValueOf(mock.Session)}
    findAndGetMethod(v[0].Interface{})
}

@xibz
xibz force-pushed the profiling_clean_history branch from efc01a2 to 37dcb0d Compare February 5, 2016 22:51
@xibz

xibz commented Feb 5, 2016

Copy link
Copy Markdown
Contributor Author

Naw, they weren't causing any issues.

@jasdel

jasdel commented Feb 5, 2016

Copy link
Copy Markdown
Contributor

Naw, they weren't causing any issues.

Probably can just removed the [7:] then to not cause unexpected issues in the future.

@xibz

xibz commented Feb 5, 2016

Copy link
Copy Markdown
Contributor Author

Oh they weren't causing issues because of that. If I removed it, it won't run

@xibz
xibz force-pushed the profiling_clean_history branch from 37dcb0d to bf5edd5 Compare February 5, 2016 23:05
@jasdel

jasdel commented Feb 5, 2016

Copy link
Copy Markdown
Contributor

LGTM

xibz added a commit that referenced this pull request Feb 5, 2016
Mock server and benchmarking memory/cpu usage
@xibz
xibz merged commit 371c1c6 into aws:master Feb 5, 2016
@xibz
xibz deleted the profiling_clean_history branch February 5, 2016 23:48
xibz added a commit that referenced this pull request Feb 9, 2016
skotambkar pushed a commit to skotambkar/aws-sdk-go that referenced this pull request May 20, 2021
Issues from Bug report template had nonexistent bug report label applied instead of bug.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants