Skip to content

Commit

Permalink
WIP!!
Browse files Browse the repository at this point in the history
  • Loading branch information
pedohorse committed Sep 18, 2024
1 parent 61fa39f commit dd164ac
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
name: tests-report_lin_${{matrix.pyver}}
path: tests_log_linux_${{matrix.pyver}}.xml
if: ${{ always() }}
timeout-minutes: 20
timeout-minutes: 40

tests_windows:
name: "Tests Windows"
Expand Down
13 changes: 8 additions & 5 deletions tests/tests_net_messages/test_benchmark.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import os
import asyncio
import random
import string
import time
import threading
import multiprocessing
from unittest import IsolatedAsyncioTestCase, skip
from unittest import IsolatedAsyncioTestCase, skipIf
from lifeblood.logging import get_logger, set_default_loglevel
from lifeblood.nethelpers import get_localhost
from lifeblood.net_messages.address import AddressChain, DirectAddress
Expand All @@ -17,6 +15,11 @@

from typing import Callable, List, Type, Awaitable

SKIP_BENCHMARK = True
if not SKIP_BENCHMARK:
# just importing the module may be extremely slow on CI workers
import multiprocessing

set_default_loglevel('DEBUG')
logger = get_logger('message_test')

Expand Down Expand Up @@ -123,11 +126,11 @@ def get_message_count(self) -> int:


class TestBenchmarkSendReceive(IsolatedAsyncioTestCase):
@skip("no reason to benchmark on slow machines")
@skipIf(SKIP_BENCHMARK, "no reason to benchmark on slow machines")
async def test_threaded(self):
await self.helper_test(ThreadedFoo)

@skip("no reason to benchmark on slow machines")
@skipIf(SKIP_BENCHMARK, "no reason to benchmark on slow machines")
async def test_proc(self):
await self.helper_test(ProcessedFoo)

Expand Down

0 comments on commit dd164ac

Please sign in to comment.