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

Consider making PerfMark accept Object for tags #4

Closed
carl-mastrangelo opened this issue Jul 13, 2019 · 4 comments
Closed

Consider making PerfMark accept Object for tags #4

carl-mastrangelo opened this issue Jul 13, 2019 · 4 comments
Labels
enhancement New feature or request
Milestone

Comments

@carl-mastrangelo
Copy link
Member

Changing PerfMark.createTag(Object name) instead of PerfMark.createTag(String name) would allowing the implementation to call toString() late in case PerfMark is disabled. Calling toString() is also kind of verbose, when it's trivial for PerfMark to call String.valueOf().

@carl-mastrangelo carl-mastrangelo added the enhancement New feature or request label Jul 13, 2019
@carl-mastrangelo carl-mastrangelo added this to the PerfMark 1.0 milestone Jul 13, 2019
@dapengzhang0
Copy link

@adiprerepa
Copy link
Contributor

Not sure if this is still a priority. Where is Impl.java in /api being implemented?

@carl-mastrangelo
Copy link
Member Author

@adiprerepa It's implemented here: https://github.com/perfmark/perfmark/blob/master/impl/src/main/java/io/perfmark/impl/SecretPerfMarkImpl.java

The issue here is Object is a kind of surprising API

@carl-mastrangelo
Copy link
Member Author

After toying with the lambda string function in master, I think passing object here is a mistake. Passing in a strongly typed value value and stringer I think is a better long term API, because Object is too easy to misuse (despite it being correct).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants