vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   vbMicroStats: page load time, queries, GZIP and PHP version (https://vborg.vbsupport.ru/showthread.php?t=35811)

TECK 07-04-2002 07:36 PM

check your db_mysql.php file. there is your prob.. the microtime.

trilOByte 07-04-2002 07:47 PM

OK, looking can't see the prob...

PHP Code:

  function query($query_string) {
    global 
$query_count,$showqueries,$explain,$querytime,$pagestarttime;
    
// do query

    
$pageendtime=microtime();
    
$starttime=explode(" ",$pagestarttime);
    
$endtime=explode(" ",$pageendtime);

    
$beforetime=$endtime[0]-$starttime[0]+$endtime[1]-$starttime[1];

    
$this->query_id mysql_query($query_string,$this->link_id);
    if (!
$this->query_id) {
      
$this->halt("Invalid SQL: ".$query_string);
    }

    
$query_count++;

    
$pageendtime=microtime();
    
$starttime=explode(" ",$pagestarttime);
    
$endtime=explode(" ",$pageendtime);

    
$aftertime=$endtime[0]-$starttime[0]+$endtime[1]-$starttime[1];
    
$querytime+=$aftertime-$beforetime;

    if (
$showqueries) {
      echo 
"Query: $query_string\n";
      echo 
"Time before: $beforetime\n";
      echo 
"Time after:  $aftertime\n" 

???

What's the prob?

trilOByte 07-04-2002 09:33 PM

Fixed...

Quote:

Page generated in 0.25673795 seconds (73.55% PHP - 26.45% MySQL) with 36 queries.
User error as usual ;)

I hacked the wrong global.php file. Doof! :D

Thanks.

Gary King 07-04-2002 10:00 PM

Quote:

Originally posted by trilOByte
Fixed...



User error as usual ;)

I hacked the wrong global.php file. Doof! :D

Thanks.

Common mistake :)

Glad you got it working :D

TECK 07-06-2002 03:09 AM

Quote:

Originally posted by trilOByte
I hacked the wrong global.php file. Doof! :D
Thanks.

is it to high 36 queries? i think it is. is there a way you reduce them? like around 20-25 should be a good number.

Kars10 07-06-2002 07:44 AM

Hi Guys!!
How can i reduce my Querys?? Ive got on index 38-39....
Please help! ;)

trilOByte 07-06-2002 08:36 AM

Quote:

is it to high 36 queries? i think it is. is there a way you reduce them? like around 20-25 should be a good number.
That's with the vBportal leftcolumn running, when I switch it off, I get:

Quote:

Page generated in 0.20114601 seconds (65.73% PHP - 34.27% MySQL) with 21 queries.

Gary King 07-06-2002 01:23 PM

I just tried and got this:

Code:

This page was brought to you in 0.14173198 seconds (84.24% PHP & 15.76% MySQL), with 30 queries!

trilOByte 07-06-2002 02:40 PM

You mean you turned your portal leftcolumn off, and still get 30 queries on your forum/index.php?

Gary King 07-06-2002 02:57 PM

Quote:

Originally posted by trilOByte
You mean you turned your portal leftcolumn off, and still get 30 queries on your forum/index.php?
I don't have a portal for my vB. I just went to my index.php again, and got the following:

Code:

This page was brought to you in 0.14055097 seconds (84.13% PHP & 15.87% MySQL), with 30 queries!
:ermm:


All times are GMT. The time now is 03:31 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02305 seconds
  • Memory Usage 1,752KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)bbcode_php_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete