How to slow down a single directory for debugging?

I am currently trying to reproduce an error which, in my opinion, is caused by a thread synchronization error.

Unfortunately, the error only occurs on the client site, but not on my development machine.

Since these flows are associated with access to the hard drive, which is very slow on the client site (about 1 MB / s), I think the reason I cannot reproduce the error is because my hard drive is much faster.

Is there a tool that can slow down access to a specified speed for a single directory?

Decision

jdv pointed me to WANem and now this is the best solution. The setup is a bit complicated because it forces me to use 3 PCs to run my test (I could not start WANem in VMWare Player 3.0 due to network problems). However, after I configured all the systems, it works very well.

+2
source share
3 answers

You can put files in a network share to another system (your colleague) and display it on your system as a disk. Then run the bandwidth up to 10 Mbps (preferably on your machine for sorting :)).

So, get lower speeds (or higher latency), use the WAN emulator: wanem.sourceforge.net/

+2

1 /? , 10 / .

+2

you can just try to slow down the code that accesses the directory, and not slow down the directory. for example, throwing a few dreams in strategic places.

what is the problem you see and in what language do you use?

+1
source

Source: https://habr.com/ru/post/1733904/


All Articles