Changes between Version 18 and Version 19 of benchmarks
- Timestamp:
- 10/17/11 11:04:08 (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
benchmarks
v18 v19 35 35 In 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. 36 36 37 The following snippet shows a pseudocode of the function `sustain_thread`: 38 {{{ 39 #!div style="font-size: 90%" 40 {{{#!sh 41 1. start_timer() 42 2. for i = 1 .. jobs_per_thread 43 2a: submit_job(job[i]) 44 3. 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]) 51 4. stop_timer() 52 }}} 53 }}} 37 54 === Test 2 - Throughput ===