Changes between Version 18 and Version 19 of benchmarks

Show
Ignore:
Timestamp:
10/17/11 11:04:08 (13 years ago)
Author:
bartek
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • benchmarks

    v18 v19  
    3535In general, the idea of the program is to keep in a system `jobs_per_thread` jobs for `test_duration` seconds, inquering all the time (the delays between calls drawn from a defined interval) about all currently running or queued jobs. At the end of tests, the program prints average times of submitting jobs and inquiring about the job status. 
    3636 
     37The following snippet shows a pseudocode of the function `sustain_thread`: 
     38{{{ 
     39#!div style="font-size: 90%" 
     40{{{#!sh 
     411. start_timer() 
     422. for i = 1 .. jobs_per_thread 
     43  2a: submit_job(job[i]) 
     443. while (current_time < test_duration) do 
     45  3a: for i = 1 .. jobs_per_thread 
     46  3a1: if (! is_finished(job[i].last_state)) 
     47    3a11: sleep((rand() / RAND_MAX) / SLEEP_COEF) 
     48    3a11: query_state(job[i]) 
     49  3a2: if (is_finished(job[i].last_state)) 
     50    3a21: submit_job(job[i]) 
     514. stop_timer() 
     52}}} 
     53}}} 
    3754=== Test 2 - Throughput ===