mt-story Pub

Parallelism tests

Fire and forget:

val DUR:Number="500"=500

send::  msg  (var:Number="1"=1)

Wait for response

Fire and wait:

send::  msg  (var:Number="1"=1)

parallel fire and wait (fork-join)

send::  msg ctx.set  (start=DIESEL_CURMILLIS)

val total:Number="0"=0

Fire and wait:

send::  msg  (var:Number="1"=1)

send::  msg ctx.set  (stop=DIESEL_CURMILLIS)

Overall duration should be around 3DUR, so less than 4DUR if the engine is not too busy...

send::  msg ctx.echo  (duration=(stop - start))

expect::  (duration < (3 * DUR))
// $expect (total is 4)

Was this useful?    

By: Razie | 2020-10-03 .. 2020-10-04 | Tags: story , dsl

Viewed 144 times ( | Print ) this page.

You need to log in to post a comment!

© Copyright DieselApps, 2012-2021, all rights reserved.