Compare commits
No commits in common. "0ce64231c75fdfa62c73341c1060c9665b365b76" and "96f7800fd55e4cfd846904596797c6295cef7c40" have entirely different histories.
0ce64231c7
...
96f7800fd5
Binary file not shown.
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 317 KiB |
|
@ -352,7 +352,7 @@ class Manager:
|
|||
async def animator(self):
|
||||
while True:
|
||||
for animation in self.animations:
|
||||
frame = int(time.time() / animation.spf + animation.offset) % len(
|
||||
frame = int(time.time() / animation.spf) % len(
|
||||
animation.frames
|
||||
)
|
||||
self.put_image(
|
||||
|
|
|
@ -50,15 +50,8 @@
|
|||
"path": "../pictures/non-reflection.gif",
|
||||
"x": 300,
|
||||
"y": 40,
|
||||
"spf": 5,
|
||||
"offset": -467
|
||||
},
|
||||
{
|
||||
"type": "animation",
|
||||
"path": "../pictures/neko.gif",
|
||||
"spf": 30,
|
||||
"x": 625,
|
||||
"y": 496
|
||||
"spf": 15,
|
||||
"offset": -822
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -58,7 +58,7 @@ class WorkerManager:
|
|||
self.shmem.buf[OFFSET_STATE + byte] & mask
|
||||
):
|
||||
await self.queue.put(index)
|
||||
await asyncio.sleep(0.01)
|
||||
await asyncio.sleep(0.001)
|
||||
|
||||
async def writer(self, bot_index: int, proxy: Optional[str] = None):
|
||||
connector = ProxyConnector.from_url(proxy) if proxy else None
|
||||
|
@ -73,8 +73,6 @@ class WorkerManager:
|
|||
cookie = bot_index, self._restarts[bot_index]
|
||||
self.workers.add(cookie)
|
||||
|
||||
await sio.send("unsubscribe")
|
||||
|
||||
try:
|
||||
batch = 0
|
||||
while sio.connected:
|
||||
|
@ -82,6 +80,14 @@ 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
|
||||
):
|
||||
|
@ -111,7 +117,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: {self.batch_size * len(self.workers) / self.delay}")
|
||||
print(f"Toggles: {self.n_toggles / diff:.2f}/s EST: {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}")
|
||||
|
|
Loading…
Reference in New Issue