4

I would like to ask the following question into SO

Does anyone know or measured the runtime impact of org.apache.commons.math3.stat.descriptive library in java In my code I am using both the org.apache.commons.math3.stat.descriptive.rank.Median and the org.apache.commons.math3.stat.descriptive.DescriptiveStatistics to calculate some statistics over a set of data.

According to my requirements the amount of values is going to grow 10^4 scalle I want to have an insight of the memory and cpu usage as my data will grow. The values in my data are long. So is a calculation like number_of_values * 8byte enough to see the memory consumption, or should I consider something else? What about cpu usage?

Is there any know 'performnce' analysis for the aforementioned libraries?

Is this question valid or it is off-topic or too broad?

4
  • 2
    I don't understand why you need to ask this exact question. Generate 10k or 100k values and then test the code which you seem to have. If it doesn't do what you want then ask a question stating exactly what's happening and what you want to happen. For the avoidance of doubt, "it's not quick enough" is not a question unless you also say how fast you want it to go and in exactly what environment.
    – Ben
    Apr 19, 2015 at 20:06
  • @Ben The thing is that I do not have the resources to test it as I want. Thats why I am asking if anyone knows how these libraries behave, for exaple if the is a function that It can 'quess' the consumption. I also do not want to procced further my implementation without knowing if the libraries are what I need. The profiling that @ Makoto proposed is a good way to go. Either way, from your comment, I understand what more info should I add. Thanks!
    – Athafoud
    Apr 19, 2015 at 20:18
  • From your comment I think there's still more that you need to add to the question. If you don't currently have the resources to deal with this amount of data then you're going to run into problems no matter the profile of the libraries you're using. If you're looking to buy hardware to enable you to run this then that's a slightly different matter but you run into more problems as you should be scaling beyond your theoretical maximum - just knowing the amount of CPU needed to do thing X doesn't help you with the future or with OS requirements etc.
    – Ben
    Apr 19, 2015 at 20:23
  • @Ben so as i understand, I am missing a big WHY from my question!
    – Athafoud
    Apr 19, 2015 at 20:31

1 Answer 1

7

We don't know your use case, your memory constraints, your hardware specifications or your performance requirements, so I would say that this question is indeed too broad.

If you want to determine this, then you would have to look into profiling software. There's a whole plethora of them out there, so it shouldn't be too tough to find a suite that can give you the answers that you need.

4
  • Thanks! I will try to add the information you mentioned when I will post this as a question. The "profiling software" is a good insight to start!
    – Athafoud
    Apr 19, 2015 at 20:01
  • 2
    So the reason I went with "use case" and "performance requirements" was that those are questions that only you can answer. That's why it's entirely too broad; we don't have access to what you're doing with this code to tell you if the performance is going to be suited to your needs.
    – Makoto
    Apr 19, 2015 at 20:02
  • 1
    @Athafoud you're not planning on asking for profiling software, are you? Because no.
    – user1228
    Apr 20, 2015 at 16:57
  • @Will No, that of course no. I will use profiling software, to try and find the answer to my question. Regarding the results, I may revise my question or not ask it at all.
    – Athafoud
    Apr 20, 2015 at 17:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .