Kbase P156031: Simple Java test program to measure Java memory outside of OpenEdge
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  1/24/2011 |
|
Status: Verified
GOAL:
Simple Java test program to measure Java memory outside of OpenEdge
GOAL:
Simple Java test program to measure the memory foot print associated with Java.
FACT(s) (Environment):
All Supported Operating Systems
Progress/OpenEdge Product Family
FIX:
This is just a simple Java test program to measure memory size for different versions of Java outside of OpenEdge.
1. Copy the following Java code to your machine and call it memTest.java.
import java.io.*;
public class memTest
{
private static int timeout = 60000;
public static void main(String args[])
{
int wait = timeout / 1000;
System.out.println("Starting simple memory test");
System.out.println("\nWAITING " + wait + " second(s)!\n");
try
{
Thread.sleep(timeout);
} catch (InterruptedException ie)
{
ie.printStackTrace();
}
System.out.println("Ending simple memory test");
}
}
2. Then compile it. javac memTest.java
3. Then execute the code.
4. Use the ps command to view VSZ and compare it to other platform in an effort to identify the difference in size associated with Java versions outside of OpenEdge executables. Example of ps command on the PID associated with the Java memTest program running compiled and running on Linux:
UNIX95= ps -eo 'rss pid args' | grep PID
The RSS associated with the PID you entered for the java memTest program will be displayed.