Jump to content
  • Advertisement
Sylon87

how to test my Task Scheduler

Recommended Posts

Hello!

 

i have build my own task scheduler for my game, what i need is some kind of algorithm that create a lot of object that send a task to it... anyone know one?

Share this post


Link to post
Share on other sites
Advertisement

for (i = 0; i < some big number; ++i) { schedule task; }

However, since this answer is trivially simple, I doubt it's what you are looking for.  Perhaps you should clarify what you mean.

Share this post


Link to post
Share on other sites

well, i'm looking for some algorithm that send task randomly, for examplei instantiate 200 object that randomnly send a task evety random seconds etc.. it's like a stress test

Share this post


Link to post
Share on other sites
8 hours ago, Sylon87 said:

well, i'm looking for some algorithm that send task randomly, for examplei instantiate 200 object that randomnly send a task evety random seconds etc.. it's like a stress test

That still seems relatively straightforward. For example, you could create some objects (e.g. 200, as in your example) that wait a random time interval, schedule a task, wait a random time interval, schedule a task, and so on. In other words, exactly what you described in your post above.

If that doesn't cover it, then as Nypyren suggested maybe you could clarify what it is exactly that you're not sure how to do.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!