Is there an option in BAS to monitor how much network data is being used by a script? As I will be renting proxies based on data usage it will be really helpful to see how much network data my script consumes.
@caplaz
Is that the correct method?
Yes, this will work.
Can I write to the csv file?
Yes, there is action called Write File(which also has append switch).
Can also use csv_generate api for proper escaping.
Action "Custom" and
[[CSV_LINE]] = csv_generate(["a","b","c"],",")
Or should that be done in a seperate file?
Better use database, not csv
I want my threads to loop forever but no matter what I do they eventually end. Sometimes with success and sometimes with error.
If you have any failure during thread run, for eaxmple failed to load with proxy error, the thread will end. And as long as you set "use each line one time" to resource, it won't be used again.
Ending with success is strange, probably, because you are using labels inside loops, 20 version has good explanation about this:
There are two types of goto: long and short. Short move is performed if goto and label are located inside same block (has one parent). This type of move preserves execution history and script continues afterward. In other cases long move is performed, which clears execution history. Long move case is perfect if you are jumping on script start, but if you move inside loop, you must use another move to leave it, otherwise thread will stop with success message.
Anyway, if you have some code, that may return error, just wrap it inside ignore errors action.
You can also wrap whole list of actions that you want to do with account inside ignore errors block.
Like this
0_1500075786806_listfromfile-loop.xml
@andreiem I added a random sleep time before all the procedures started. The 1st thread starts. and then 2nd thread .. 3 and 4 5 ... Since they do not do the same operations at the same time, they do not consume much processor.
@yourfriendkarol said in [Network cache mask deny] action works for browser only or http client too?:
i think it could help my pc resources a lot. if i understood correctlly, it works only for browser.
and in case you visit 100 websites+ (without restarting thread/browser), the cache you didnt save (or saved) really makes a difference in performance especially if its a lot of threads?
Correct, the network actions are related to the browser only. Denying the data you will not need, img or css for example will load the websites alot faster and will not save the information for future usages.
@yourfriendkarol said in why specifically my pc lags with bas apps? my resources usage are low. Are bots that didnt reset for long, lagging?:
im doing A LOT of HTTP client 'get' and browser pages loading, scraping too, as you said.
"browser pages" - this could be the cause due to writing the data if you're using profiles. I will run some test later this week and check on the I/O with [ X ] threads, browsers w & w/o profiles and report back since my laptop
spoiler
The HTTP Requests are never stored (only Cookies) on the disk, only memory which can increase by x2 if you're calling the content to a variable. HOST C++ Variables (which will be managed the best it will be) <- TO -> JS Variable which (Is an unknown how it's done to me since C++ isn't my cup of tea) is only memory related, converted down to C++ (Is my Guess! - Don't hold me to it).