-
Notifications
You must be signed in to change notification settings - Fork 778
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
Question about the new Metrics
stats interface
#11349
Comments
We require rebuilding plugins for new major version releases of ATS. |
The common use case, using these APIs rather than the old APIs in ts.h (which also uses the new Metrics under the hood) would be
If you want the pointer, you can get it from the id, e.g.
or, you can also create them directly with createPtr() as above, e.g.
Note that the lookup() functionalities requires locking around the lookup tables etc., so are not a good idea to do in critical code. The ID can be used to access the metric directly though, without locks, such as
|
Thank you all for the clarifications. |
Hi there,
I'm developing an ATS plugin for our company and I need few statistic counters in the plugin.
According to this page, I should use the new APIs from
Metrics.h
for this purpose. Correct me if I misunderstood the Note.I glanced over the functionality in the
Metrics.h
and checked its usage inside the ATS core. I think, I understood how to use it.However, I'm wondering about the future binary compatibility.
So far, all of the other APIs are C functions and opaque types/pointers to hide the actual implementation.
However, this new functionality exposes lots of implementation details in the header file along with the
Metrics
data member.Now if I use this functionality and for example:
Metrics
functionality which change the implementation of some of the inline functions and/or the data members ofMetrics
.It seems to me, that In the above scenario the plugin may experience some UB (Undefined Behavior) effects if run along ATS version 12.
Did I misunderstood something?
Or there is no guarantee for binary compatibility between the ATS versions and I should always rebuild the plugins against the currently used ATS version?
The text was updated successfully, but these errors were encountered: