measure the expense time and memory of my cluster algorithms

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

measure the expense time and memory of my cluster algorithms

francisco paz
Hello,

Does somebody knows, how can i measure the expense time and memory of
my cluster algorithms from an easy way! I don't want a java profiler!
I just want a program that tells me that my program use  X memory or
X% memory and spends Yseconds or minutes or hours!
I want to establish a relation between time and  memory for my cluster
algorithms with an increase of data base size!

Example:
simpleKMeans -N 5 -S 20 -t iris.arff  -> spends 2 min and 30% cpu memory

Can you help me!
Thanks any way!

Francisco Paz

_______________________________________________
Wekalist mailing list
[hidden email]
https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
Reply | Threaded
Open this post in threaded view
|

Re: measure the expense time and memory of my cluster algorithms

Eibe Frank
My guess is that measuring actual memory consumption inside the JVM is
probably not possible without using a profiler or changing the code. Of
course, it's different if you are just interested in the amount of
physical memory used by the JVM. But that number will depend on the
maximum heap size.

A crude way to measure running time is the "time" command available on
Unix machines.

Cheers,
Eibe

On Jul 26, 2005, at 3:12 AM, francisco paz wrote:

> Hello,
>
> Does somebody knows, how can i measure the expense time and memory of
> my cluster algorithms from an easy way! I don't want a java profiler!
> I just want a program that tells me that my program use  X memory or
> X% memory and spends Yseconds or minutes or hours!
> I want to establish a relation between time and  memory for my cluster
> algorithms with an increase of data base size!
>
> Example:
> simpleKMeans -N 5 -S 20 -t iris.arff  -> spends 2 min and 30% cpu
> memory
>
> Can you help me!
> Thanks any way!
>
> Francisco Paz
>
> _______________________________________________
> Wekalist mailing list
> [hidden email]
> https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist


_______________________________________________
Wekalist mailing list
[hidden email]
https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
Reply | Threaded
Open this post in threaded view
|

Re: measure the expense time and memory of my cluster algorithms

Len Trigg
Eibe Frank wrote:
> My guess is that measuring actual memory consumption inside the JVM is
> probably not possible without using a profiler or changing the code. Of

We have an internal tool we wrote that measures the size of an object
using reflection to traverse the object tree.  It also collects counts
on the numbers and types of objects encountered during the traversal.
We use it to point at a classifier after a build to identify where
memory is used.  Probably for a simple approximation, you could
measure the size of the object when serialized.

Measuring actual CPU usage (as opposed to elapsed time) inside java is
hard.  I think the unix time command is probably the easiest way to
go.


Cheers,
Len.

_______________________________________________
Wekalist mailing list
[hidden email]
https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
Reply | Threaded
Open this post in threaded view
|

Re: measure the expense time and memory of my cluster algorithms

Richard Kirkby
Len Trigg wrote:

>Measuring actual CPU usage (as opposed to elapsed time) inside java is
>hard.  I think the unix time command is probably the easiest way to
>go.
>
>  
>
Out of interest, the situation is better than it used to be. Java 5
introduced the java.lang.management.ThreadMXBean which can be used to
query CPU time.

Cheers,

Richard
--

_______________________________________________
Wekalist mailing list
[hidden email]
https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist