Server Help Forum Index Server Help
Community forums for Subgame, ASSS, and bots
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStatistics   RegisterRegister 
 ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin (SSL) 

Server Help | ASSS Wiki (0) | Shanky.com
Function Timing in Java

 
Post new topic   Reply to topic Printable version
 View previous topic  SCOTUS ruling on Grokster Post :: Post Hey everyone please help out  View next topic  
Author Message
Cyan~Fire
I'll count you!
I'll count you!


Age:37
Gender:Gender:Male
Joined: Jul 14 2003
Posts: 4608
Location: A Dream
Offline

PostPosted: Thu Jun 23, 2005 12:30 pm   Post maybe stupid    Post subject: Function Timing in Java Reply to topic Reply with quote

OK, my attempt to hijack Cyhper's Thread failed, so I'll just have to make a new topic.

What I want to do is function timing. Although Cerium's method may work as a last resort, currentTimeMillis() won't be exact at all, and the results will be pretty skewed. Anyway, I need the function to actually run once like normal since it's going to be a networking test. I don't want to do any simulated packets or anything, because the test needs to be as close to real life as possible.

So, is there anything like profiling in Java that wouldn't require me modifying the code beyond the point that it becomes practically useless?
_________________
This help is informational only. No representation is made or warranty given as to its content. User assumes all risk of use. Cyan~Fire assumes no responsibility for any loss or delay resulting from such use.
Wise men STILL seek Him.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Dr Brain
Flip-flopping like a wind surfer


Age:39
Gender:Gender:Male
Joined: Dec 01 2002
Posts: 3502
Location: Hyperspace
Offline

PostPosted: Thu Jun 23, 2005 12:49 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

A quick google search (for "Java Profiler") revealed: http://ejp.sourceforge.net/
_________________
Hyperspace Owner

Smong> so long as 99% deaths feel lame it will always be hyperspace to me
Back to top
View users profile Send private message Add User to Ignore List AIM Address Yahoo Messenger MSN Messenger
Cerium
Server Help Squatter


Age:43
Gender:Gender:Male
Joined: Mar 05 2005
Posts: 807
Location: I will stab you.
Offline

PostPosted: Thu Jun 23, 2005 1:34 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

JProfiler is great to have regardless.

The CPU view may be exactly what youre looking for (plus the graphs are pretty). The only downside, is it only displays the total runtime for a specific function across all of the times its used, so youd have to make sure your function is only called once, or just do the math yourself.
_________________
There are 7 user(s) ignoring me right now.
Back to top
View users profile Send private message Add User to Ignore List AIM Address
Cyan~Fire
I'll count you!
I'll count you!


Age:37
Gender:Gender:Male
Joined: Jul 14 2003
Posts: 4608
Location: A Dream
Offline

PostPosted: Mon Jun 27, 2005 9:33 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

OK, this'll work fine. Thanks, Brain.

I didn't just blindly search Google because I knew a few of you are Java programmers and might have a specific recommendation.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> Trash Talk All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum
View online users | View Statistics | View Ignored List


Software by php BB © php BB Group
Server Load: 53 page(s) served in previous 5 minutes.

phpBB Created this page in 0.651812 seconds : 29 queries executed (91.4%): GZIP compression disabled