Background

Goals

  1. Using the following test function provided, measure the insertion performance
//shortcut to get ticks in milliseconds since epoch
var s = (new Date())*1

print('start: ' + s)
print(Date())

for(var i=0;i < 10000;i++)
  test_ProcessCreate()

var e = (new Date())*1

print('end: ' + e)
print(Date())

var d = (e - s)/1000

print('====')
print('delta in secs ' + d)
print('====')

test_ProcessCreate() → function to generate a self-created ProcessCreate event

Using the codes above, we created a new function to measure how long it takes to insert 10000 ProcessCreate events.

Results:

First attempt: It took 100.776 seconds to insert 10000 ProcessCreate events.

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/8af06f4a-4cda-4d07-a5f7-6e3b3631663d/Untitled.png

Second attempt: It took 92 seconds to insert 10000 ProcessCreate events.

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/7b3d281d-ade6-42a2-8c63-2afa030f1338/Untitled.png

Third attempt: It took 96.509 seconds to insert 10000 ProcessCreate events.

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/8c5bc11b-620a-44e1-8da0-6f691ea61d81/Untitled.png

On average, it takes around 96 seconds to insert 10000 ProcessCreate events.

*Note that test_ProcessCreate() function always generate an Orphan ProcessCreate

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/77ce5117-0059-46c3-a7ce-7e7d6ee2d53f/Untitled.png

  1. Propose how modify any test other server functions to measure the total time taken for complete processing such that there are no more ProcessCreate with ToBeProcessed = true for both cases:

(a) Orphan ProcessCreate

(b) ProcessCreate that can be linked