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

Create generic histogram performance counter #2327

Closed
hkaiser opened this issue Sep 8, 2016 · 17 comments
Closed

Create generic histogram performance counter #2327

hkaiser opened this issue Sep 8, 2016 · 17 comments

Comments

@hkaiser
Copy link
Member

hkaiser commented Sep 8, 2016

This could be done similarily to the statistics counter which calculates the mean of the values periodically extracted from any other counter.

@diehlpk
Copy link
Member

diehlpk commented Jan 24, 2017

@Sumit2318
Copy link

I have build HPX on my system.How to build the performance counter? Could you please help me how to start ?What should be my approach?

@hkaiser
Copy link
Member Author

hkaiser commented Mar 4, 2017

@Sumit2318 could we please continue this discussion on our mailing list (hpx-users@stellar.cct.lsu.edu)?

Once you have built HPX, all the performance counters are in place - those are part of HPX itself. Have you read the corresponding documentation about how to use them? If not, it might be a good idea to do that (see: http://stellar-group.github.io/hpx/docs/html/hpx/manual/performance_counters.html and all sub-sections of this).

@hkaiser hkaiser modified the milestones: 1.0.0, 1.1.0 Apr 23, 2017
@msimberg msimberg removed this from the 1.1.0 milestone Nov 21, 2017
@victor-ludorum
Copy link
Contributor

Hello @hkaiser Sir, I am working on this issue and combining this project with "Add more Arithmetic Performance Counters" for the coming GSOC 2018. So, during the work, I have found a histogram implementation in the HPX. Hence, I am thinking to take the help of this code to implement Histogram performance counter.
Thus, I have some confusion about this code. Hope you clear it.

  1. First thing which I want to ask is about the insertion of values for bins. Is this loop help to enter the data in the bins of the histogram.
  2. Second thing What is this extractor here . Do we have to return this as a result after constructing histogram?
  3. Third thing is result , here we are getting the result in a pair of values. Do, I have to return the result in the same way ??

Please suggest !!
Thanks!!

@hkaiser
Copy link
Member Author

hkaiser commented Mar 17, 2018

First thing which I want to ask is about the insertion of values for bins. Is this loop help to enter the data in the bins of the histogram.

The data is entered by invoking the operator()() on the histogram object (https://github.com/STEllAR-GROUP/hpx/blob/master/hpx/util/histogram.hpp#L107)

Second thing What is this extractor here . Do we have to return this as a result after constructing histogram?

You might want to familiarize yourself with the Boost.Accumulators library (http://www.boost.org/doc/libs/1_66_0/doc/html/accumulators.html). The extractor is the facility used by this library to access the data in a generic way.

Third thing is result , here we are getting the result in a pair of values. Do, I have to return the result in the same way

In order to represent values collected as a histogram you need two values for each of the histogram bins: the position of the bin and the number of values in that bin.

We have created one histogram counter in HPX to collect various timings from the parcel coalescing module (/coalescing/time/parcel-arrival-histogram). The code for this counter is here: https://github.com/STEllAR-GROUP/hpx/blob/master/plugins/parcel/coalescing/coalescing_message_handler.cpp#L368 and here: https://github.com/STEllAR-GROUP/hpx/blob/master/plugins/parcel/coalescing/performance_counters.cpp.
This counter returns an array of values, where the first three values represent the three parameters used for the histogram followed by one value for each of the histogram buckets (see https://stellar-group.github.io/hpx/docs/html/hpx/manual/performance_counters/counters.html, at the very end).

The idea for the generic histogram counter would be to to collect histograms on top of an any other counter, very much like the other statistics counters. This histogram counter should expose the collected data in the same way as the existing parcel-arrival-histogram counter.

@victor-ludorum
Copy link
Contributor

Thanks a lot @hkaiser sir!! I will study those files and then communicate with you if I got any problem.

@victor-ludorum
Copy link
Contributor

victor-ludorum commented Mar 19, 2018

Hello Sir!! @hkaiser @msimberg, I have figured out some steps needed for implementing new histogram performance counter. As it is implemented similar to the statistics performance counter so I am going to implement new performance counter in src/performance_counters/server in HPX.

  1. Add its declaration in counters.cpp file like it is given for statistics performance counter .
  2. Create new performance counter in the registry.cpp file as given here and here
  3. Then create a histogram_performance_counter.hpp as it is for different performance counters like arithmetic and statistics performance counter.
  4. After this create a histogram_performance_counter.cpp file for its implementation.
  5. Lastly add its details in runtime.cpp file.

Please suggest whether I am thiking in right direction or not.
Thanks!!

@hkaiser
Copy link
Member Author

hkaiser commented Mar 19, 2018

Sounds like a plan to me.

@victor-ludorum
Copy link
Contributor

@hkaiser Hello Sir!! I want to ask one thing, is there anything in HPX which has visual or pictorial representation. Actually, I am thinking (for future plan ) that if it is possible to implement histogram pictorially so that it would be much easier to gather information from it. Also if it is possible Can you suggest some ideas to add in histogram performance counter .
Please suggest!!
Thanks!! 😊

@hkaiser
Copy link
Member Author

hkaiser commented Mar 23, 2018

is there anything in HPX which has visual or pictorial representation. Actually, I am thinking (for future plan ) that if it is possible to implement histogram pictorially so that it would be much easier to gather information from it.

There is no pictorial representation for the histograms yet, at least nothing coherent. We've been using some python scripts to parse the generated output. Such a script would be a nice addition to your GSoC plan, I think.

Can you suggest some ideas to add in histogram performance counter . Please suggest!!

I'm not sure what you're looking for. The idea is to create a performance counter that produces a histogram from the results returned by invoking any other counter several times. The naming scheme for this counter would be similar to that of the other statistics counters., The histogram counter would invoke any other given counter at a predefined time interval, collect the data retrieved and expose it as its result (the histogram).

@victor-ludorum
Copy link
Contributor

@hkaiser Hello Sir!!
I have some doubts.
How can I add a test to show the working of new Histogram Performance counter? Actually, in the Arithmetic Performance Counter implementation, I haven't seen any test file regarding that. Therefore, I have confusion. I have also searched for the other performance counters. But I haven't found much relevant just one or two like this statistics_2666.cpp.

One more thing as you have suggested that I have to implement it like /coalescing/time/parcel-arrival-histogram. Can I use the idea or implementation strategy to implement it in the same way in Histogram Performance counter or I have to go with some new strategy.
Sir, I have done some work. This is the link (victor-ludorum#2). Please review it so that I can remove my some silly mistake. Then I will open a PR for the main HPX branch.

@hkaiser
Copy link
Member Author

hkaiser commented Apr 22, 2018

... I haven't seen any test file regarding that

@victor-ludorum you're right, we don't have extensive tests for our performance counters. Feel free to come up with a new scheme to test those.

Can I use the idea or implementation strategy to implement it in the same way in Histogram Performance counter or I have to go with some new strategy.

Feel free to use what you see. Most probably you will have to modify things here and there to make it fit into your plans, however.

@victor-ludorum
Copy link
Contributor

@hkaiser Thanks, Sir!! I have done some work. Please have a review if you got some time. This is the link (victor-ludorum#2).

@hkaiser
Copy link
Member Author

hkaiser commented Apr 22, 2018

@victor-ludorum yes, I have seen this. I think @msimberg has done a nice review and has put together a comprehensive list of comments for you to work on.

@victor-ludorum
Copy link
Contributor

@hkaiser Okay Sir!! Thanks a lot!! I will follow yours and Simberg Sir advice.
Thanks once again!!

@stale
Copy link

stale bot commented Jul 4, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the tag: wontfix label Jul 4, 2019
@stale
Copy link

stale bot commented Aug 3, 2019

This issue has been automatically closed. Please re-open if necessary.

@stale stale bot closed this as completed Aug 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants