Standardization of perf counters comments
Hi,
I would like to propose something.
There are a lot of perf counters in different places in code, but the most of them are undocumented. I found only one commented counter in OSD.cc code, but not for all metrics. Name of counter is not very clear as it's description, sometimes isn't at all.
So, I have an idea, that it would be great, if perf schema would contain not only the counter type, but some description too. It can be added in PerfCountersBuilder methods - at first as optional parameter with empty string by default, later, may be, as required parameter. This short description could be saved in perf_counter_data_any_d struct together with other counter properties and appear in perf schema as the second counter property.
It is more useful, than just comment all counters in code, because in this case we would be able to get counter's description outside ceph in any analize program, which will use counter's values for any performance reports.
I can implement it, if it would be interesting.
-------------------------------
Best regards,
Alyona Kiseleva
Quoted 19 lines · Alyona Kiseleva
Hi,
I would like to propose something.There are a lot of perf counters in different places in code, but the most of them are undocumented. I found only one commented counter in OSD.cc code, but not for all metrics. Name of counter is not very clear as it's description, sometimes isn't at all.
So, I have an idea, that it would be great, if perf schema would contain not only the counter type, but some description too. It can be added in PerfCountersBuilder methods - at first as optional parameter with empty string by default, later, may be, as required parameter. This short description could be saved in
perf_counter_data_any_dstruct together with other counter properties and appear in perf schema as the second counter property.
It is more useful, than just comment all counters in code, because in this case we would be able to get counter's description outside ceph in any analize program, which will use counter's values for any performance reports.
Quoted 1 line
I can implement it, if it would be interesting.
This would be very interesting! We talked about this a while back. See
http://wiki.ceph.com/Planning/Blueprints/Giant/annotate_perfcounters
http://wiki.ceph.com/Planning/Blueprints/Giant/annotate_config_options
http://pad.ceph.com/p/cdsgiant-annotate-config-perfcounters
http://www.youtube.com/watch?v=bQuGZ-3u8Xw&feature=share&t=3m58s
from the giant CDS. It's mainly been waiting for a motivated developer... :)
sage
Quoted 8 lines · Alyona Kiseleva
Hi,
I would like to propose something.There are a lot of perf counters in different places in code, but the most of them are undocumented. I found only one commented counter in OSD.cc code, but not for all metrics. Name of counter is not very clear as it's description, sometimes isn't at all.
Quoted 7 lines
So, I have an idea, that it would be great, if perf schema would contain not only the counter type, but some description too. It can be added in PerfCountersBuilder methods - at first as optional parameter with empty string by default, later, may be, as required parameter. This short description could be saved in
perf_counter_data_any_dstruct together with other counter properties and appear in perf schema as the second counter property.
I actually suspect that we'll be more successful if the description is not optional. That way people are forced to provide a string of some kind, instead of not knowing that it's even an option to do so. It's more up-front work to provide a description for all the counters but should make everything a lot more accessible to users than saying "well, *some* of them have descriptions, if we were feeling conscientious that day and knew about doing so". ;)
-Greg
I agree with the non-optional part.
-Sam
Quoted 30 lines · Gregory Farnum
Quoted 8 lines · Alyona Kiseleva
Hi,
I would like to propose something.There are a lot of perf counters in different places in code, but the most of them are undocumented. I found only one commented counter in OSD.cc code, but not for all metrics. Name of counter is not very clear as it's description, sometimes isn't at all.
Quoted 7 lines
So, I have an idea, that it would be great, if perf schema would contain not only the counter type, but some description too. It can be added in PerfCountersBuilder methods - at first as optional parameter with empty string by default, later, may be, as required parameter. This short description could be saved in
perf_counter_data_any_dstruct together with other counter properties and appear in perf schema as the second counter property.I actually suspect that we'll be more successful if the description is not optional. That way people are forced to provide a string of some kind, instead of not knowing that it's even an option to do so. It's more up-front work to provide a description for all the counters but should make everything a lot more accessible to users than saying "well, *some* of them have descriptions, if we were feeling conscientious that day and knew about doing so". ;)
-Greg
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 10 lines · Gregory Farnum
Quoted 8 lines · Alyona Kiseleva
Hi,
I would like to propose something.There are a lot of perf counters in different places in code, but the most of them are undocumented. I found only one commented counter in OSD.cc code, but not for all metrics. Name of counter is not very clear as it's description, sometimes isn't at all.
Quoted 7 lines
Quoted 7 lines
So, I have an idea, that it would be great, if perf schema would contain not only the counter type, but some description too. It can be added in PerfCountersBuilder methods - at first as optional parameter with empty string by default, later, may be, as required parameter. This short description could be saved in
perf_counter_data_any_dstruct together with other counter properties and appear in perf schema as the second counter property.
There will be lots of counters that aren't usefully describable in a single sentence. That doesn't excuse them from being documented, but we should be careful to avoid generating useless tautological strings like num_strays_delayed -> "Number of strays currently that are currently delayed". For lots of things, an understandable definition will require some level of introduction of terms and concepts -- in my example, what's a stray? what does it mean for it to be delayed?
While we shouldn't hold up the descriptions waiting for documentation that explains all the needed concepts, we should think about how that will fit together. Perhaps, rather than having a single string in the code, we should look to create a separate metadata file that allows richer RST docs for each setting, and verify that all settings are described during the docs build (i.e. a gitbuilder fail will tell us if someone added a setting without the associated documentation). That way, the short perfcounter descriptions could include hyperlinks to related concepts elsewhere in the docs.
John
I think, it is a good idea to have both detailed and short description with link in second.
But, may be, it isn't bad to start with a simple way - adding functionality to extend schema, and continue with improving it with detailed description in docs.
Yes, I agree, that required parameter is better, but if we will be feeling not very conscientious, this required string may contain something useless too :)
-------------------------------
Best regards,
Alyona Kiseleva
Quoted 38 lines · John Spray
Quoted 10 lines · Gregory Farnum
Quoted 8 lines · Alyona Kiseleva
Hi,
I would like to propose something.There are a lot of perf counters in different places in code, but the most of them are undocumented. I found only one commented counter in OSD.cc code, but not for all metrics. Name of counter is not very clear as it's description, sometimes isn't at all.
Quoted 7 lines
Quoted 7 lines
So, I have an idea, that it would be great, if perf schema would contain not only the counter type, but some description too. It can be added in PerfCountersBuilder methods - at first as optional parameter with empty string by default, later, may be, as required parameter. This short description could be saved in
perf_counter_data_any_dstruct together with other counter properties and appear in perf schema as the second counter property.There will be lots of counters that aren't usefully describable in a single sentence. That doesn't excuse them from being documented, but we should be careful to avoid generating useless tautological strings like
num_strays_delayed-> "Number of strays currently that are currently delayed". For lots of things, an understandable definition will require some level of introduction of terms and concepts -- in my example, what's a stray? what does it mean for it to be delayed?While we shouldn't hold up the descriptions waiting for documentation that explains all the needed concepts, we should think about how that will fit together. Perhaps, rather than having a single string in the code, we should look to create a separate metadata file that allows richer RST docs for each setting, and verify that all settings are described during the docs build (i.e. a gitbuilder fail will tell us if someone added a setting without the associated documentation). That way, the short perfcounter descriptions could include hyperlinks to related concepts elsewhere in the docs.
John
I made a commit on this feature on my fork and I would like to have some feedback :)
https://github.com/Ved-vampir/ceph/commit/b09abb08ed4b26da19ebe5eae733e03c94e2bc8f\
It contains new functionality for perfcounterbuilder class and comments for some counters as example.
I permanently add a default value to parameter: to comment all counters is a long work due to their count and I want to have successful compilation.
What do you say about this?
Should I continue in the same way, or something is wrong? And another question: if it's ok, should I comment all counters and then create a pool request (it will be large and, may be, difficult to review) or better is to create it on every one-two commented files (in this case default value will exist before all counters will have their descriptions)?
-------------------------------
Best regards,
Alyona Kiseleva
Quoted 53 lines · Alyona Kiselyova
I think, it is a good idea to have both detailed and short description with link in second.
But, may be, it isn't bad to start with a simple way - adding functionality to extend schema, and continue with improving it with detailed description in docs.Yes, I agree, that required parameter is better, but if we will be feeling not very conscientious, this required string may contain something useless too :)
-------------------------------
Best regards,
Alyona KiselevaQuoted 38 lines · John Spray
Quoted 10 lines · Gregory Farnum
Quoted 8 lines · Alyona Kiseleva
Hi,
I would like to propose something.There are a lot of perf counters in different places in code, but the most of them are undocumented. I found only one commented counter in OSD.cc code, but not for all metrics. Name of counter is not very clear as it's description, sometimes isn't at all.
Quoted 7 lines
Quoted 7 lines
So, I have an idea, that it would be great, if perf schema would contain not only the counter type, but some description too. It can be added in PerfCountersBuilder methods - at first as optional parameter with empty string by default, later, may be, as required parameter. This short description could be saved in
perf_counter_data_any_dstruct together with other counter properties and appear in perf schema as the second counter property.There will be lots of counters that aren't usefully describable in a single sentence. That doesn't excuse them from being documented, but we should be careful to avoid generating useless tautological strings like
num_strays_delayed-> "Number of strays currently that are currently delayed". For lots of things, an understandable definition will require some level of introduction of terms and concepts -- in my example, what's a stray? what does it mean for it to be delayed?While we shouldn't hold up the descriptions waiting for documentation that explains all the needed concepts, we should think about how that will fit together. Perhaps, rather than having a single string in the code, we should look to create a separate metadata file that allows richer RST docs for each setting, and verify that all settings are described during the docs build (i.e. a gitbuilder fail will tell us if someone added a setting without the associated documentation). That way, the short perfcounter descriptions could include hyperlinks to related concepts elsewhere in the docs.
John
Quoted 3 lines · Alyona Kiselyova
I made a commit on this feature on my fork and I would like to have some feedback :)
https://github.com/Ved-vampir/ceph/commit/b09abb08ed4b26da19ebe5eae733e03c94e2bc8f\
A few minor comments:
- I would call it "description" instead of "help"
- separate out the win/lose correction into a separate patch
- make one patch add the description field and default arg
- add actual descriptions in additional patch(es)
Quoted 7 lines
It contains new functionality for perfcounterbuilder class and comments for some counters as example.
I permanently add a default value to parameter: to comment all counters is a long work due to their count and I want to have successful compilation.
What do you say about this?
Should I continue in the same way, or something is wrong?
It looks good!
Quoted 5 lines
And another question: if it's ok, should I comment all counters and then create a pool request (it will be large and, may be, difficult to review) or better is to create it on every one-two commented files (in this case default value will exist before all counters will have their descriptions)?
If they're separated into different patches they'll be easy to review. I don't think it matters too much whether we merge them all in one pull request or over time... that probably mostly depends on how motivated you are to go document all of them :)
Thanks!
sage
Quoted 66 lines
-------------------------------
Best regards,
Alyona KiselevaQuoted 14 lines · Alyona Kiselyova
I think, it is a good idea to have both detailed and short description with link in second.
But, may be, it isn't bad to start with a simple way - adding functionality to extend schema, and continue with improving it with detailed description in docs.Yes, I agree, that required parameter is better, but if we will be feeling not very conscientious, this required string may contain something useless too :)
-------------------------------
Best regards,
Alyona KiselevaQuoted 39 lines
Quoted 38 lines · John Spray
Quoted 10 lines · Gregory Farnum
Quoted 8 lines · Alyona Kiseleva
Hi,
I would like to propose something.There are a lot of perf counters in different places in code, but the most of them are undocumented. I found only one commented counter in OSD.cc code, but not for all metrics. Name of counter is not very clear as it's description, sometimes isn't at all.
Quoted 7 lines
Quoted 7 lines
So, I have an idea, that it would be great, if perf schema would contain not only the counter type, but some description too. It can be added in PerfCountersBuilder methods - at first as optional parameter with empty string by default, later, may be, as required parameter. This short description could be saved in
perf_counter_data_any_dstruct together with other counter properties and appear in perf schema as the second counter property.There will be lots of counters that aren't usefully describable in a single sentence. That doesn't excuse them from being documented, but we should be careful to avoid generating useless tautological strings like
num_strays_delayed-> "Number of strays currently that are currently delayed". For lots of things, an understandable definition will require some level of introduction of terms and concepts -- in my example, what's a stray? what does it mean for it to be delayed?While we shouldn't hold up the descriptions waiting for documentation that explains all the needed concepts, we should think about how that will fit together. Perhaps, rather than having a single string in the code, we should look to create a separate metadata file that allows richer RST docs for each setting, and verify that all settings are described during the docs build (i.e. a gitbuilder fail will tell us if someone added a setting without the associated documentation). That way, the short perfcounter descriptions could include hyperlinks to related concepts elsewhere in the docs.
John
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html