#1
  1. A Change of Season
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Mar 2004
    Location
    Next Door
    Posts
    3,476
    Rep Power
    221

    How can I test if this is gonna crash the server or not?


    Hi;

    How can I tell if this can handle +1 million records. I vaguely remember someone mentioning date_diff might be better, but I feel easier with strtotime.
    $this->data['plcs'] is always small (max 4) but $this->data['launch_prospects'] estimating up to 5 mill.

    date formats are YYYY-MM-DD H:i

    PHP Code:
    $count=0;
    $total_previous 0;
    foreach(
    $this->data['plcs'] as $val=>$row)
        {
            
    $this->data['plcs'][$count]['prospetcs'] = 0;
            
    $this->data['plcs'][$count]['from'] = $total_previous;
            
    $this->data['plcs'][$count]['to'] = strtotime($row['release_after']." ".$row['days_hours_minutes'], 0) + $total_previous;
            
    $total_previous += $this->data['plcs'][$count]['to'];
            
    $count++;
        }
    $count=0;
    foreach(
    $this->data['plcs'] as $val_plc=>$row_plc)
        {
            foreach(
    $this->data['launch_prospects'] as $prospects=>$prospect)
                {
                    
    $datetime_2 time();
                    
    $datetime_1 strtotime($prospect['date_added']." ".$prospect['time_added']);
                    
    $since_joined $datetime_2 $datetime_1;
                            
                    if( (
    $row_plc['from'] < $since_joined) && ($since_joined <= $row_plc['to']) )
                        {
                            
    $this->data['plcs'][$count]['prospetcs']++;
                        }    
                }
            
    $count++;    
        } 
    Thanks
  2. #2
  3. Impoverished Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    16,750
    Rep Power
    9646
    "prospetcs"

    The only way you can test to see if something will crash the server is to try to crash the server. Look into the field of load testing.
  4. #3
  5. A Change of Season
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Mar 2004
    Location
    Next Door
    Posts
    3,476
    Rep Power
    221
    I thought of a solution that I don't even need a third party testing app. Let me know your thoughts on this:

    I have accounts with a few autoresponders like https://www.infusionsoft.com/ and Ontraport.

    I can use a simple php script and generate 1 million email addresses.

    Then using the API add them to Sequences in IFS or Aweber or ...

    Then the rest is done. Most of these systems send webhooks for free.

    Specifically to test my API endpoint and transactions.

    Thoughts, ideas, comments?
  6. #4
  7. Wiser? Not exactly.
    Devshed God 2nd Plane (6000 - 6499 posts)

    Join Date
    May 2001
    Location
    Bonita Springs, FL
    Posts
    6,250
    Rep Power
    4150
    Those companies probably won't be too happy with you generating a bunch of fake data and using them as a test platform. What's wrong with just using one of the tools you linked previously?
    Recycle your old CD's



    If I helped you out, show some love with some reputation, or tip with Bitcoins to 1N645HfYf63UbcvxajLKiSKpYHAq2Zxud

IMN logo majestic logo threadwatch logo seochat tools logo