Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7187031
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T18:45:26+00:00 2026-05-28T18:45:26+00:00

I am building a testing script which is checking the performance of a set

  • 0

I am building a testing script which is checking the performance of a set of commands. The test script needs to let it run for a specific amount of time before failing the test.

I found the PerformanceTestCase in the PHPUnit documentation website, but when I tried to use it I realised that it’s old functionality which hasn’t been included within the new version. (That doc is PHPUnit 3.0, and my version is 3.5).

Is there an equivalent for this functionality within PHPUnit 3.5, and how do I use it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T18:45:27+00:00Added an answer on May 28, 2026 at 6:45 pm

    I ran into a smiliar issue today – I needed to test an external HTTP call was occuring within the allocated time.

    Rather than build another loop or take $start and $end time readings – I exposed the timed_out param, detailed here http://www.php.net/manual/en/function.stream-get-meta-data.php

    while (!feof($fp)) {
        $info = stream_get_meta_data($fp);
        if ($info['timed_out']) {
            $this->timed_out = true;
            fclose($fp);
            throw new Exception("Request timed out");
        }
        else {
            $response .= fgets($fp, 128);
        }
    }
    fclose($fp);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

hey guys Im building a script by which Im attempting to find specific links
I'm building a test harness for my Delphi 2009 app. Testing the logic is
I am building a tool for out-of-container EJB testing. I have managed to run
I'm building an application which I'm also testing in Heroku. I ran into some
I'm building a testing system to test the integrity of records in a database.
I'm building a regression system ( not unit testing) for some Perl scripts. A
During the process of building software applications, you would start testing what you have
I'm new to Unit Testing, and I'm only getting into the routine of building
I was doing my academic project and while building and testing i have put
I'm using NUnit for testing back-end. Unit tests are being executed while building (I'm

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.