retaw fo ssalg a ma I

This commit is contained in:
Casey 2024-07-11 05:21:04 +03:00
parent 96f7800fd5
commit 1c6d6d8b28
Signed by: hkc
GPG Key ID: F0F6CFE11CDB0960
3 changed files with 10 additions and 11 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 317 KiB

After

Width:  |  Height:  |  Size: 1.0 MiB

View File

@ -51,7 +51,14 @@
"x": 300,
"y": 40,
"spf": 15,
"offset": -822
"offset": -408
},
{
"type": "animation",
"path": "../pictures/neko.gif",
"spf": 30,
"x": 625,
"y": 496
}
]
}

View File

@ -58,7 +58,7 @@ class WorkerManager:
self.shmem.buf[OFFSET_STATE + byte] & mask
):
await self.queue.put(index)
await asyncio.sleep(0.001)
await asyncio.sleep(0.01)
async def writer(self, bot_index: int, proxy: Optional[str] = None):
connector = ProxyConnector.from_url(proxy) if proxy else None
@ -80,14 +80,6 @@ class WorkerManager:
byte, bit = index >> 3, index & 7
mask = 0x80 >> bit
if self.shmem.buf[OFFSET_AVOID + byte] & mask:
self.miss_avoid += 1
continue
if (self.shmem.buf[OFFSET_MASK + byte] & mask) == 0:
self.miss_mask += 1
continue
if (self.shmem.buf[OFFSET_CANVAS + byte] & mask) != (
self.shmem.buf[OFFSET_STATE + byte] & mask
):
@ -117,7 +109,7 @@ class WorkerManager:
print()
print(f"Workers: {len(self.workers)} {self.workers}")
print(f"Queue size: {self.queue.qsize()}/{self.queue.maxsize}")
print(f"Toggles: {self.n_toggles / diff:.2f}/s EST: {len(self.workers) / self.delay}")
print(f"Toggles: {self.n_toggles / diff:.2f}/s EST: {self.batch_size * len(self.workers) / self.delay}")
print(f"Misses: A:{self.miss_avoid} M:{self.miss_mask} S:{self.miss_state}")
print(f"Q: {self.queue}")