@kubernetes/sig-api-machinery-misc
—
You are receiving this because you are on a team that was mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
Another that might be worth considering is https://github.com/sanity-io/litter - I like that emits Go-style literals. Unclear if that can be compacted into 1 line, if it handles map keys and things as well as spew does.
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale
.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close
.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale
/lifecycle frozen
/remove-lifecycle stale
It doesn't look like anyone has looked at this recently. Would anyone mind if I took a run at wrapping the suggested sanity-io/litter with the suggested util.PrettyPrintObject(interface{}) as suggested? I'm pretty new to go so this seemed like something I could tackle.
@nikhita:
This request has been marked as suitable for new contributors.
Please ensure the request meets the requirements listed here.
If this request no longer meets these requirements, the label can be removed
by commenting with the /remove-good-first-issue
command.
In response to this:
I'm going to label this a good-first-issue because the changes are relatively easier and there is already a PR (which was closed due to age) that can be used as a reference: #55383
/good-first-issue
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
I'm going to label this a good-first-issue because the changes are relatively easier and there is already a PR (which was closed due to age) that can be used as a reference: #55383
/good-first-issue
—
/kind cleanup
I would like to take this up.
/assign
@gokultp: GitHub didn't allow me to assign the following users: gokultp.
Note that only kubernetes members and repo collaborators can be assigned.
For more information please see the contributor guide
In response to this:
I would like to take this up.
/assign
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
—
I compared the performances of both spew and litter packages. attaching the benchmarks below.
goos: linux
goarch: amd64
pkg: github.com/gokultp/bookmark_pretty_printers
BenchmarkLitter-4 300000 4679 ns/op 1824 B/op 79 allocs/op
BenchmarkSpew-4 500000 2668 ns/op 656 B/op 26 allocs/op
PASS
clearly spew is performing better than litter, so I am using spew for writing the util function.
Actually https://github.com/kr/pretty is working well. here is the benchmarks
BenchmarkPretty-4 500000 2653 ns/op 360 B/op 14 allocs/op
BenchmarkLitter-4 300000 4717 ns/op 1824 B/op 79 allocs/op
BenchmarkSpew-4 500000 2639 ns/op 656 B/op 26 allocs/op
also attaching the formatted outputs
{{foo false 12344} 1234.123 [foo bar]}
main.TestType{
Field1: main.SubType{
Field2: "foo",
Field3: false,
Field4: 12344,
},
Field5: 1234.123,
Field6: []string{
"foo",
"bar",
},
}
main.TestType{Field1:main.SubType{Field2:"foo", Field3:false, Field4:12344}, Field5:1234.123, Field6:[]string{"foo", "bar"}}
so I'll be changing the util function to use https://github.com/kr/pretty, as it is giving better performance and almost the same output.
I agree that it may not make a lot of sense to actually migrate anything over here. I personally prefer the standard lib output.
It seems like fanzhangio has already resolved the aim of this ticket. What all things are left in this to work ?
Hi
Can this ticket be marked as closed or is there anything left? I would like to help, if required.
/close
—
You are receiving this because you are on a team that was mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
@Salamandastron1: You can't close an active issue/PR unless you authored it or you are a collaborator.
In response to this:
/close
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
—
/assign
/unassign
Hi,
Is this ticket closed or still open.
I wanted to take this .
—
You are receiving this because you are on a team that was mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
/assign
/close
@cixtor: You can't close an active issue/PR unless you authored it or you are a collaborator.
In response to this:
/close
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
—
Hi
It looks like this issue now has a separate PR. @thockin could you take a look and see if this is something still viable after 6 years? kubernetes/utils#226
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are on a team that was mentioned.
Based on kubernetes/utils#226 (comment), we decided to work on k/k first, then move to kubernetes/utils @thockin
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are on a team that was mentioned.
Closed #8976 as completed via #114800.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are on a team that was mentioned.