Results 1 to 8 of 8
  1. #1
    Mojito_gr is offline Member
    Join Date
    Jan 2010
    Posts
    4
    Rep Power
    0

    Default High Compile Time

    Hello,

    I need a program that will take for ages to compile and will use a fair amount of system resources to do so.
    I don't care what it does, I just want it to to be resource consuming

    I made a Dhrystone benchmark, but that lasts for 30-40 milliseconds and event if put it in an endless loop it still doesn't use that much of resources

    I need this consuming program because I want to benchmark the system while eclipse is working really hard compiling something

    Anyone has any good suggestion what could I make to achieve that level of usage? Or any pointers to anything useful?

    Kind Rergards
    Tasos
    Last edited by Mojito_gr; 07-31-2010 at 01:05 AM. Reason: forgot words

  2. #2
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    Endless loops not cause a difference for compile time, only in run-time you can see the effect.

    It's not an easy task to write a code that take a long time to compile it, because the javac parser is more advance in processing. If you can write a simple class and add whatever you want there. Compile it and check the time. Then copied the same class multiple times with different names, and initialize object on each other to make a chain between those. Compile and see.

  3. #3
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    I don't know really what you are want to benchmark with a Java code. Because eclipse processor utilization cannot benchmark with a Java application, which you've bad implementation on it.

  4. #4
    Mojito_gr is offline Member
    Join Date
    Jan 2010
    Posts
    4
    Rep Power
    0

    Default

    Ok let me explain, I have a virtual machine with linux on top of a windows7 host.

    I want to benchmark the performance of the windows host when the linux guest is running eclipse and is doing something.

    Thats why I am looking to write a program that will stress the system resources of the virtual guest, while I benchmark the effect on the host.

  5. #5
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,371
    Blog Entries
    7
    Rep Power
    20

    Default

    Quote Originally Posted by Mojito_gr View Post
    Ok let me explain, I have a virtual machine with linux on top of a windows7 host.

    I want to benchmark the performance of the windows host when the linux guest is running eclipse and is doing something.

    Thats why I am looking to write a program that will stress the system resources of the virtual guest, while I benchmark the effect on the host.
    I don't think compilation ever stresses resources; if you look at the JVM specs, e.g. a method can only have 64K bytes of code in it; there can only be so many String literals etc. Those boundaries are too low to run out of memory or cause the compiler to do excessive processing. All you can do is write a little Java program that generates another (useless) Java program that borders those boundaries and compile the latter program.

    kind regards,

    Jos

  6. #6
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    Quote Originally Posted by Mojito_gr View Post
    Ok let me explain, I have a virtual machine with linux on top of a windows7 host.

    I want to benchmark the performance of the windows host when the linux guest is running eclipse and is doing something.

    Thats why I am looking to write a program that will stress the system resources of the virtual guest, while I benchmark the effect on the host.
    As Jos explains in the previous post, and as I tried to point to you, using a compiler process time it's not possible to do this. Did you try what I'm suggest to you?

  7. #7
    Mojito_gr is offline Member
    Join Date
    Jan 2010
    Posts
    4
    Rep Power
    0

    Default

    hello,

    Thank you for your replies,

    What I really care about is the overhead eclipse is producing.
    I will try your suggestions and compare the results.

    kind regards
    Tasos

  8. #8
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    First you have to do is monitor the resource utilization of Eclipse in your system and compare with it different systems on a same application. Basically it can cause your system resources as well.

Similar Threads

  1. Replies: 3
    Last Post: 08-23-2011, 12:46 PM
  2. calculate time diff for particular time period
    By baktha.thalapathy in forum New To Java
    Replies: 2
    Last Post: 05-24-2010, 04:10 PM
  3. Replies: 0
    Last Post: 07-09-2009, 11:11 AM
  4. Java 1.5 compile time error
    By ank_k in forum New To Java
    Replies: 4
    Last Post: 11-13-2008, 11:12 AM
  5. Help with Compile time errors
    By bri1547 in forum New To Java
    Replies: 2
    Last Post: 08-24-2008, 11:22 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •