• Resolved Altaico

    (@altaico)


    Hi,

    thank you for this awesome plugin. But, I have a problem the I put this code in the functions.php to follow the “timings” in my web.

    // Start the ‘foo’ timer:
    do_action( ‘qm/start’, ‘foo’ );

    // Run some code
    my_potentially_slow_function();

    // Stop the ‘foo’ timer:
    do_action( ‘qm/stop’, ‘foo’ );

    The web just crash.

    Is it correct the code? In this way I can’t check the performance of my web.

    Thank you

    Regards

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author John Blackbourn

    (@johnbillion)

    WordPress Core Developer

    Yes that’s correct. Are you able to check your PHP error log to see what the error is?

    Thread Starter Altaico

    (@altaico)

    Also, the plugin crash when I modify the products in woocommerce.

    This is the error when I modify the products in woocommerce:

    Fatal error: Uncaught Error: parse_url() expects parameter 1 to be string, null given
    in /home/customer/www/altaico.es/public_html/wp-content/plugins/query-monitor/collectors/http.php on line 374

    Call stack:

    1. parse_url()
      wp-content/plugins/query-monitor/collectors/http.php:374
    2. QM_Collector_HTTP::process()
      wp-content/plugins/query-monitor/classes/Collectors.php:84
    3. QM_Collectors::process()
      wp-content/plugins/query-monitor/classes/Dispatcher.php:108
    4. QM_Dispatcher::get_outputters()
      wp-content/plugins/query-monitor/dispatchers/Redirect.php:39
    5. QM_Dispatcher_Redirect::filter_wp_redirect()
      wp-includes/class-wp-hook.php:324
    6. WP_Hook::apply_filters()
      wp-includes/plugin.php:205
    7. apply_filters()
      wp-includes/pluggable.php:1396
    8. wp_redirect()
      wp-admin/includes/post.php:2205
    9. redirect_post()
      wp-admin/post.php:234

    Query Monitor

    And this is the error when I add the code for timings:

    Fatal error: Uncaught Error: Call to undefined function my_potentially_slow_function()
    in /home/customer/www/altaico.es/public_html/wp-content/themes/generatepress-child/functions.php on line 138

    Call stack:

    1. include()
      wp-settings.php:611
    2. require_once()
      wp-config.php:83
    3. require_once()
      wp-load.php:50
    4. require_once()
      wp-admin/admin.php:34
    5. require_once()
      wp-admin/index.php:10

    Query Monitor

    Plugin Author John Blackbourn

    (@johnbillion)

    WordPress Core Developer

    my_potentially_slow_function is just some example code, you should replace this with the code that you’re trying to profile.

    Thread Starter Altaico

    (@altaico)

    Understood, I would like to check what functions slow down the website.

    For example, the timer stars a when the page is loaded, Query Monitor?records the page generation time?and check what slow down it.

    Can you help me?

    Please and thank you.

    • This reply was modified 1 year, 1 month ago by Altaico.
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Code timings crash website’ is closed to new replies.