mt-story Pub

Parallelism tests

Fire and forget:

val DUR:Number<-300

send::  msg testdiesel.mt.fireForget  (var:Number<-1)

Wait for response

Fire and wait:

send::  msg testdiesel.mt.requestResponse  (var:Number<-1)

parallel fire and wait (fork-join)

send::  msg ctx.set  (start<-DIESEL_CURMILLIS)

val total:Number<-0

Fire and wait:

send::  msg testdiesel.mt.forkJoin  (var:Number<-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 17 times ( | Print ) this page.

You need to log in to post a comment!

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