-
Notifications
You must be signed in to change notification settings - Fork 712
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
Refactor process mappers into taggers. #178
Conversation
tomwilkie
commented
Jun 4, 2015
- Removed the cgroup mapper
- Adds topology tagger
014c601
to
dfb1fe4
Compare
if err != nil { | ||
log.Fatal(err) | ||
log.Printf("warning: failed to start docker tagger: %v", err) |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
dfb1fe4
to
3c32944
Compare
LGTM |
@@ -24,7 +24,7 @@ var ( | |||
readFile = ioutil.ReadFile | |||
) | |||
|
|||
func newPIDTree(procRoot string) (*pidTree, error) { | |||
func newRealPIDTree(procRoot string) (*pidTree, error) { |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
3c32944
to
45017f0
Compare
edit: none of that is done in this PR |
Yes this makes good sense. I though this was the plan all along. Yay code review! I'm still not comfortable with this tagging interface, but I can't come up with anything nicer. We'll probably have to come back to it at some later point. |
|
Lets not introduce the containers topology in the this PR; it will make the rest of #123 unmergable. But I think what you're saying is that, given above, tagger will not need to do foreign key lookups? And therefore, we can massively simplify this interface? |
|
Do you want to have a crack at that (if you're not busy on marketing)? I'm trying to break out some other changes right now. |
|
|
|
Some (friendly) comments:
This change has already been open for too long; lets do the minimal thing to get it ready and then merge it. I think that minimal thing is to simplify / remove the tagger interface. |
|
Don't make the mapper create new topologies? Preserve the existing behaviour? |
The end result of this PR is that Tagger operates on just a Report. @tomwilkie PTAL. |
func (t *dockerTagger) Tag(r report.Report) report.Report { | ||
for _, topology := range []*report.Topology{ | ||
&(r.Process), | ||
&(r.Network), |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
762b98d
to
07d9525
Compare
Please squash this down to one change and rebase on top of master. |
- Reduce tagger interface to operate on reports - Remove cgroup tagger
07d9525
to
d486d10
Compare
\o/ LGTM \o/ |
Refactor process mappers into taggers.