|
Joined: Jan 2001
Posts: 1,940
Developer
|
Developer
Joined: Jan 2001
Posts: 1,940 |
Hack Name: UBB Clock Cycles Description: Informs user how long UBB completes a specific script operation. Version: 00.00.02beta Download Link: http://www.qasic.com/ubbhacks.html Update Info: To update just read the thread on how we've debugged this hack. WARNING: There's a lot of tedious hacking to this hack - lots of Template hack. Not hard hacking but doing the same cut and paste over and over in different templates Report bugs here. qasic
|
|
|
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
YES!!!
I have been looking for something like this Q.. thank you very much... was talking to Mark about this last week... muy bueno!
I want to start bench-marking plain jane ubb's and see what different mods do for speed...
|
|
|
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
That is a lotta files to modify...:)
This would do well in a MHK setup...:)
nm, most of this can be handled with a "replace in files" in ultraedit...
|
|
|
|
Joined: Jan 2001
Posts: 1,940
Developer
|
Developer
Joined: Jan 2001
Posts: 1,940 |
LOL. Every tried Compact Headers/Footers Allen? That's the number reason why programs such as MHK/SHW exist But yes, Replace in Files is an excellent trick. Too bad the Search in Files doesn't work on my Windows 2K for some reason Oh well. qasic
|
|
|
|
Joined: Sep 2000
Posts: 1,304
Addict
|
Addict
Joined: Sep 2000
Posts: 1,304 |
Whoa...that's a crap load of files. Is there a demo before I get myself into no man's land?
|
|
|
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
Hey GoTo... if Q doesn't have one... I'll put one up on our test forums...
|
|
|
|
Joined: Mar 2000
Posts: 3,594
Moderator / Template Diva
|
Moderator / Template Diva
Joined: Mar 2000
Posts: 3,594 |
Hey now, 36 files isn't *that* bad... er, is it? And CFooters only mods FOUR files! I can do Compact Headers in like seven or eight minutes if I'm doing it locally. But then, I've done it a couple dozen times, so I'm good at it. This seems like a cool hack, qasic. It will be going up on my test (soon to be public) site asap. ---Skorpion [ May 14, 2001 12:31 AM: Message edited by: Skorpion ]
Don't put that signature in your mouth! You don't know where it's been!
|
|
|
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
added to a test site with nothing but this and the wordlets_mods deal added... getting:
Processing Time: 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU)
for all pages, including search... there's only maybe 20 posts there, it should have some reading, shouldn't it?
|
|
|
|
Joined: Mar 2001
Posts: 318
Member
|
Member
Joined: Mar 2001
Posts: 318 |
hahaha ****! sorry but i am pissed! i was 2 steps away from finishinga multihack auto install when it crashed on me! oh well mabey another time
|
|
|
|
Joined: Jan 2001
Posts: 1,940
Developer
|
Developer
Joined: Jan 2001
Posts: 1,940 |
Allen, you have the Benchmark module installed? I heard that it was standard in every Perl installation but perhaps I'm wrong???
Thx.
q
|
|
|
|
Joined: Jan 2001
Posts: 1,940
Developer
|
Developer
Joined: Jan 2001
Posts: 1,940 |
GoTan, would a screenshot suffice? I've only got it running locally right now. I basically want to use it to test my own hacks to see how hard they are on the CPU.
qasic
|
|
|
|
Joined: Aug 2000
Posts: 874
Moderator / Developer
|
Moderator / Developer
Joined: Aug 2000
Posts: 874 |
ive got the benchmark module as well and get this on all pages: Processing Time: 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU)
would the server being *Nix vs. Windows environment have anything to do with it?
[ May 14, 2001 01:53 PM: Message edited by: jordo ]
|
|
|
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
we are using Win2K/IIS5/AS Perl 5.6.1.626
|
|
|
|
Joined: Jan 2001
Posts: 1,940
Developer
|
Developer
Joined: Jan 2001
Posts: 1,940 |
Hmm,
Perhaps it's because of the - subroutine I put in. Allen, can you remove the $elapsed =~ s/(-)//g; routine from some templates and see if the seconds show some value (or in ubb_forum.cgi)? I probably think that's what is casuing the problems.
$ta and $tb are global variables which I've set up near the top of ultiamtebb.cgi.
qasic
|
|
|
|
Joined: Jan 2001
Posts: 1,940
Developer
|
Developer
Joined: Jan 2001
Posts: 1,940 |
Sorry folks, I had forgotten one line inside ultimatebb.cgi. Just right after the use vars statements inside that file add: That should fix those stupid 0's. Also the elapsed =~ s/(-)//g; should also be removed to give accurate results. (that is, if you have negative numbers, you have a super fast CPU .. hehe) qasic [ May 14, 2001 05:24 PM: Message edited by: qasic ]
|
|
|
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
yep, fixed it... muchas gracias...
|
|
|
|
Joined: Aug 2000
Posts: 874
Moderator / Developer
|
Moderator / Developer
Joined: Aug 2000
Posts: 874 |
thanks for the fix. this hack is something ive always wanted/needed, thanks for doing it.
|
|
|
|
Joined: Sep 2000
Posts: 1,304
Addict
|
Addict
Joined: Sep 2000
Posts: 1,304 |
Does the elapsed =~ s/(-)//g; have to be removed or is it unnecessary? I'm kind of confused on that. Very cool hack Q
|
|
|
|
Joined: Jan 2001
Posts: 1,940
Developer
|
Developer
Joined: Jan 2001
Posts: 1,940 |
Let's put it this way. It'll be gone in the next beta version q
|
|
|
|
Joined: Sep 2000
Posts: 1,304
Addict
|
Addict
Joined: Sep 2000
Posts: 1,304 |
|
|
|
|
Joined: Sep 2000
Posts: 1,304
Addict
|
Addict
Joined: Sep 2000
Posts: 1,304 |
OK I'm done removing that one line but I *think* I am getting strange results.
Are the clock cycles suppose to be negative?
This is what I am getting: Processing Time: -5 wallclock secs (-0.30 usr + -0.05 sys = -0.35 CPU)
|
|
|
|
Joined: Jan 2001
Posts: 1,940
Developer
|
Developer
Joined: Jan 2001
Posts: 1,940 |
Hmmm ... sometimes negative results are expected. However, locally, I always generate negative results so that's why I added that sub regexp in. In that case, I may keep that in Thx for being a Guinea Pig Gotan. Any more users willing to try? qasic
|
|
|
|
Joined: Sep 2000
Posts: 1,304
Addict
|
Addict
Joined: Sep 2000
Posts: 1,304 |
Ehhh, I'll keep two version just in case something goes wrong again [edit] Oops, forgot smilies are handled differently :), and your welcome Q, I like beta testing even though it's a hassle [/edit] [ May 14, 2001 08:06 PM: Message edited by: GoTorankusuKu ]
|
|
|
|
Joined: Aug 2000
Posts: 874
Moderator / Developer
|
Moderator / Developer
Joined: Aug 2000
Posts: 874 |
ya mines usually around -0.25
|
|
|
|
Joined: Mar 2000
Posts: 3,594
Moderator / Template Diva
|
Moderator / Template Diva
Joined: Mar 2000
Posts: 3,594 |
I'll be trying this out on my test board, qasic. Not open to the public yet cuz it's still deep in development and I've only got one license, but it will be soon. I'll let you know if I have any problems with it, tho.
---Skorpion
Don't put that signature in your mouth! You don't know where it's been!
|
|
|
|
Joined: Jan 2001
Posts: 1,940
Developer
|
Developer
Joined: Jan 2001
Posts: 1,940 |
Hey folks,
I found the reason why it was giving negative results. You have to switch the order of $ta and $tb.
So instead of:
my $elapsed = timestr((timediff($ta,$tb))); $elapsed =~ s/(-)//g;
you need:
my $elapsed = timestr((timediff($tb,$ta)));
I'll update the ZIP docs when I get some spare time.
qasic
|
|
|
|
Joined: Sep 2000
Posts: 1,304
Addict
|
Addict
Joined: Sep 2000
Posts: 1,304 |
Hey Q, about your new finding. All I go to do is replace: right?
|
|
|
|
Joined: Sep 2000
Posts: 1,304
Addict
|
Addict
Joined: Sep 2000
Posts: 1,304 |
Well I changed the line in all the files and no problems with the negatives so far. I'll keep you updated.
|
|
|
|
Joined: Jan 2001
Posts: 1,940
Developer
|
Developer
Joined: Jan 2001
Posts: 1,940 |
Code looks to be right. Just remember that sometimes it's Footer =~ s/...
qasic
|
|
|
|
Joined: Sep 2000
Posts: 1,304
Addict
|
Addict
Joined: Sep 2000
Posts: 1,304 |
Yeah I know, I used Ultra-Edit's replace function to replace all instances of: with Here's the updated text file I fixed in 5 seconds (damn I love Ultra-Edit :D)
|
|
|
|
Joined: Jan 2001
Posts: 1,940
Developer
|
Developer
Joined: Jan 2001
Posts: 1,940 |
Yep, I definetly second that.
v00.00.02beta is out. It incorporates all fixes mentioned in this thread up to this post.
qasic
|
|
|
|
Joined: Sep 2000
Posts: 1,304
Addict
|
Addict
Joined: Sep 2000
Posts: 1,304 |
Bug: In the PM (where the actual messages are/public_pm_list.pl) the was not processed. The source came out as: [ May 18, 2001 08:44 PM: Message edited by: GoTorankusuKu ]
|
|
|
|
Joined: Feb 2000
Posts: 4,625
Member
|
Member
Joined: Feb 2000
Posts: 4,625 |
NICE job Qasic!!!
|
|
|
|
Joined: Jan 2001
Posts: 1,940
Developer
|
Developer
Joined: Jan 2001
Posts: 1,940 |
Thx Gotan. Here's the fix:
******************* ubb_pm.cgi *******************
# FIND:
$ThisHTML .= $Footer;
# ADD AFTER:
$tb = new Benchmark; my $elapsed = timestr((timediff($tb,$ta))); $ThisHTML =~ s//$elapsed/;
Text file updated.
qasic
|
|
|
|
Joined: Mar 2001
Posts: 21
Junior Member
|
Junior Member
Joined: Mar 2001
Posts: 21 |
What do I need to change for this to work with who's online? One of the lines of code that you have to edit at the beginning of these instructions is replaced by the who's online hack and i'm not good enough with cgi to figure out how to make the two work together
|
|
|
|
Joined: Jan 2001
Posts: 1,940
Developer
|
Developer
Joined: Jan 2001
Posts: 1,940 |
Which lines in specific?
qasic
|
|
|
|
Joined: Sep 2000
Posts: 67
Member
|
Member
Joined: Sep 2000
Posts: 67 |
I have who's online installed and I hadn't noticed a alteration issue? Unless I missed something along the way- I installed this hack the other night, and every page works properly from what I have seen so far- including Who's Online. Nice hack btw qasic- for some oddball sick sort of geeky fetish, I like to watch the box get benchmarked when I am wandering aimlessly through the forums...
|
|
|
|
Joined: Dec 2001
Posts: 57
Member
|
Member
Joined: Dec 2001
Posts: 57 |
Hey, long time no thread chat, but I need this file......it'll be a great addition to my test boards. If anyone could upload it?
|
|
|
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
|
|
Posts: 417
Joined: November 2001
|
|
Forums63
Topics37,573
Posts293,925
Members13,849
|
Most Online5,166 Sep 15th, 2019
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|