Skip to content
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 the func of getting system and metrics snapshot by pid #10

Merged
merged 1 commit into from Oct 3, 2016

Conversation

douzl
Copy link
Contributor

@douzl douzl commented Sep 10, 2016

Signed-off-by: Zhongqiang Dou douzl0814@163.com

@coveralls
Copy link

coveralls commented Sep 10, 2016

Coverage Status

Coverage increased (+1.4%) to 80.0% when pulling b712c2d on douzl:snapshot into 7f39301 on andygrunwald:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage increased (+1.4%) to 80.0% when pulling b712c2d on douzl:snapshot into 7f39301 on andygrunwald:master.

@andygrunwald
Copy link
Owner

Thank you for this.
Right now i am on vacation and i will be back in ~9 days. Then i will have
a look.
Just to let you know :)

Am Samstag, 10. September 2016 schrieb Coveralls :

[image: Coverage Status] https://coveralls.io/builds/7827853

Coverage increased (+1.4%) to 80.0% when pulling b712c2d
b712c2d
on douzl:snapshot
into 7f39301
7f39301
on andygrunwald:master
.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#10 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AATiQIULIvt-UNDNTmlbS71-tv_NgD7Yks5qolOAgaJpZM4J5p1b
.

@coveralls
Copy link

Coverage Status

Coverage increased (+3.1%) to 81.752% when pulling 863307a on douzl:snapshot into 7f39301 on andygrunwald:master.

2 similar comments
@coveralls
Copy link

Coverage Status

Coverage increased (+3.1%) to 81.752% when pulling 863307a on douzl:snapshot into 7f39301 on andygrunwald:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+3.1%) to 81.752% when pulling 863307a on douzl:snapshot into 7f39301 on andygrunwald:master.

)

// GetMetricsSnapshot will return the snapshot of pid
func (c *Client) GetMetricsSnapshot(pid *Pid) (map[string]interface{}, error) {
Copy link
Owner

Choose a reason for hiding this comment

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

Would it make sense to add a new struct for the snapshot endpoint like you did for System?
With this we get rid of the interface{} and the necessary casting afterwards.
You applied the dummy json already in tests/master1.metrics.snapshot.json

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The fields are too much. I will handle it later. :)

@andygrunwald
Copy link
Owner

Thank you @douzl.
It looks fine :) I made a comment related to the map[string]interface{}.

Signed-off-by: Zhongqiang Dou <douzl0814@163.com>
@coveralls
Copy link

coveralls commented Sep 29, 2016

Coverage Status

Coverage increased (+3.4%) to 82.014% when pulling 3ea167d on douzl:snapshot into 13a9540 on andygrunwald:master.

@douzl
Copy link
Contributor Author

douzl commented Sep 29, 2016

@andygrunwald Updated with the struct MetricsSnapshot in type.go, please help to review. Thanks!

@andygrunwald andygrunwald merged commit 01814b5 into andygrunwald:master Oct 3, 2016
@andygrunwald
Copy link
Owner

Looks good, thank you @douzl!

@douzl douzl deleted the snapshot branch October 8, 2016 02:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants