in reply to Re^3: Reading and writting data in a text file with several scripts simultaneously time synchronization problem
in thread Reading and writting data in a text file with several scripts simultaneously time synchronization problem

To: boftx

Perfect Benchmark is exactly what I need. I am thinking of applying a few different solutions and where I can get. I am afraid the time grows as the file grows. But the flock comes in handy there.

Well the reason that I was avoiding to use DB, is that I was trying to make my code a bit more generic and I am not 100% sure yet if on my final task I will be able to apply DB.

The whole story is that I am creating a main test script that I need to produce random data and store them into a file for simplicity. The secondary scripts I want them to retrieve the data process them and also store their output on separate files, for comparison reasons after. I want to compare how many data where able to process and how fast!

In conclusion even the secondary scripts are test scripts I will chose only one of them to apply on my real goal. I am testing them to see performance under pressure in order to choose the best one.

This is the reason that either I need to store the data to a folder for later retrieving them or into a database. The problem is also that on my real goal several scripts will need to access this folder to retrieve the data.

So I am trying to make my experiments as realistic as possible.

So enough said, time for coding. I need first of all to compare the times. Initially with the folders in different formations and possible create a short script with MySQL also just to observe if there is a huge difference on process time.

P.S. Sorry for the long answer I tried to include everything.

  • Comment on Re^4: Reading and writting data in a text file with several scripts simultaneously time synchronization problem