Python Forum
time taken for storage to get full
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
time taken for storage to get full
#4
Use python tags for multi-line code. The icode tag is for inline code.

You are calculating the time each process would take by itself to fill the data, and then adding them together. That's going to be far longer than it will take all of the processes working together to consume all of the data.

There's a brute force way to do this by looping through seconds, checking each process each second to see if it consume a byte, until all the memory is consumed.

There's a quicker method using the least common multiple of the process times. Then you will know that all of the processes consume x bytes every y seconds. You will still have a little time left over after that, but you can use the brute force method to get the remainder of the time.

There's probably a better solution than than, but it's too early in the morning to get my algorithms book off the shelf.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply


Messages In This Thread
RE: time taken for storage to get full - by ichabod801 - Aug-07-2018, 12:54 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020