Last commit for demo.sh: bda10dc0f4d8e0636e817193c0558c53c836c429

Merging junctionPlanner stuff into the main trunk

gskc [2002-06-09 07:14:49]
Merging junctionPlanner stuff into the main trunk
  1. #!/bin/sh
  2.  
  3. # NOTE! change out the APP to the application you want to run
  4. APP="Apps.Face"
  5. SLEEPAPP="Apps.MySleep"
  6. OUTPUT="demo.out"
  7.  
  8.  
  9. # to run these tests you need:
  10. # - SystemDispatch.java Send.java SendDate.java SendNotify.java SendMany.java
  11. # getStats.java Apps/Face.java Apps/MySleep.java (the last two can be subbed
  12. # with your app)
  13.  
  14. # running simple tests
  15. # run regular workletJunction
  16. # sending a worklet junction and normal application
  17.  
  18. # id = default0
  19. java psl.worklets.SystemDispatch localhost target 9101 $APP >> $OUTPUT
  20.  
  21.  
  22. # iterated runs, no wait time
  23. # id = test1
  24. java psl.worklets.Send localhost target 9101 $APP 10 0 "test1" >> $OUTPUT
  25.  
  26. # iterated runs, with wait time
  27. # id = test2
  28. java psl.worklets.Send localhost target 9101 $APP 10 2000 "test2" >> $OUTPUT
  29.  
  30. # Dated run
  31. # need to change the date accordingly to:
  32. # - the date is set with the year starting at 1900, so year + 1900 is what
  33. # you get. Also note that the month starts with 0.
  34.  
  35. # id=dated junction
  36. java psl.worklets.SendDate localhost target 9101 102 3 29 2 24 >> $OUTPUT
  37.  
  38. # running notified run
  39.  
  40. # - start off waiting, to do this, make the interval = -1
  41. # - send a notifier. see SendNotify.java for details on
  42. # getting the workletJunction reference and waking it up
  43.  
  44. # id = notify
  45. # id = notifier
  46. java psl.worklets.Send localhost target 9101 $APP 2 -1 "notify" >> $OUTPUT
  47. java psl.worklets.SendNotify localhost target 9101 "notify" >> $OUTPUT
  48. # need to send it twice to remove all iterations
  49. java psl.worklets.SendNotify localhost target 9101 "notify" >> $OUTPUT
  50.  
  51. # try notifying something that isn't there
  52. # id = notifier
  53. java psl.worklets.SendNotify localhost target 9101 "foo" >> $OUTPUT
  54.  
  55. # trying to add a whole bunch of junctions in the waiting state
  56. # id = notify$i
  57. java psl.worklets.SendMany localhost target 9101 $APP 1 -1 "notify" >> $OUTPUT
  58.  
  59. java psl.worklets.SendNotify localhost target 9101 "notify19" >> $OUTPUT
  60. java psl.worklets.SendNotify localhost target 9101 "notify7" >> $OUTPUT
  61. java psl.worklets.SendNotify localhost target 9101 "notify13" >> $OUTPUT
  62.  
  63. # send an application that tests that the running state is used
  64. java psl.worklets.Send localhost target 9101 $SLEEPAPP 5 2000 "RunningState" >> $OUTPUT
  65.  
  66. # let's get the stats for what we just did
  67. java psl.worklets.getStats localhost target 9101 >> $OUTPUT