Git Product home page Git Product logo

Comments (8)

callumforrester avatar callumforrester commented on August 10, 2024 1

From passing --durations=10 to pytest:

The 10 slowest tests from before #525 (total local run time of 17s)

====================================================================================================================================== slowest 10 durations ======================================================================================================================================
3.00s call     tests/devices/unit_tests/test_focusing_mirror.py::test_mirror_set_voltage_sets_and_waits_settle_timeout_expires
2.01s call     tests/devices/unit_tests/test_zocalo_results.py::test_subscribe_only_on_called_stage
1.01s call     tests/devices/unit_tests/test_xspress3mini.py::test_stage_fails_in_failed_acquire_state
0.15s setup    tests/beamlines/unit_tests/test_device_instantiation.py::test_device_creation[i22]
0.14s setup    tests/beamlines/unit_tests/test_device_instantiation.py::test_devices_are_identical[i22]
0.14s call     tests/devices/unit_tests/test_zocalo_interaction.py::test_run_start[with_exception-expected_message1]
0.13s call     tests/beamlines/unit_tests/test_beamline_utils.py::test_device_is_new_after_clearing
0.13s call     tests/devices/unit_tests/test_gridscan.py::test_scan_within_limits_1d[-1-5-1-False]
0.11s setup    tests/devices/unit_tests/test_attenuator.py::test_set_transmission_in_run_engine
0.11s call     tests/devices/unit_tests/test_eiger.py::test_given_in_free_run_mode_and_not_all_frames_collected_in_time_when_unstaged_then_odin_stopped_and_exception_thrown

The 10 slowest tests after (total local run time of 35s)

====================================================================================================================================== slowest 10 durations ======================================================================================================================================
3.00s call     tests/devices/unit_tests/test_focusing_mirror.py::test_mirror_set_voltage_sets_and_waits_settle_timeout_expires
2.01s call     tests/devices/unit_tests/test_zocalo_results.py::test_subscribe_only_on_called_stage
1.43s setup    tests/beamlines/unit_tests/test_device_instantiation.py::test_devices_are_identical[i22]
1.26s setup    tests/beamlines/unit_tests/test_device_instantiation.py::test_devices_are_identical[p38]
1.26s setup    tests/beamlines/unit_tests/test_device_instantiation.py::test_device_creation[i22]
1.19s setup    tests/beamlines/unit_tests/test_device_instantiation.py::test_device_creation[p38]
1.06s call     tests/beamlines/unit_tests/test_beamline_utils.py::test_device_is_new_after_clearing
1.00s call     tests/devices/unit_tests/test_xspress3mini.py::test_stage_fails_in_failed_acquire_state
0.90s setup    tests/beamlines/unit_tests/test_device_instantiation.py::test_device_creation[i03]
0.83s setup    tests/beamlines/unit_tests/test_device_instantiation.py::test_devices_are_identical[i03]

Looks like the device instantiation tests are slow, so we should profile them. Possibly #415 will help as well?

from dodal.

olliesilvester avatar olliesilvester commented on August 10, 2024 1

Yeah, ignore what I said about the logs. Running the dodal tests with a version of ophyd-async which includes everything from v0.3a4 everything except Create mock signal runs at a reasonable speed (~18s), so it's something in that commit

from dodal.

DominicOram avatar DominicOram commented on August 10, 2024

We're also seeing a lot of timeout errors in tests now. This could be related

from dodal.

olliesilvester avatar olliesilvester commented on August 10, 2024

Annoyingly this doesn't seem to have a single cause. I agree that #415 should help a lot, as we suddenly have a lot more devices. Removing the logging which was added in ophyd_async 0.3a4 gets the total test time to ~30s. I'll try to add something which deals with this

from dodal.

callumforrester avatar callumforrester commented on August 10, 2024

@coretl @DominicOram and I were discussing strange slowness in mock signals too, have you seen any of that?

from dodal.

coretl avatar coretl commented on August 10, 2024

Yeah, ignore what I said about the logs. Running the dodal tests with a version of ophyd-async which includes everything from v0.3a4 everything except Create mock signal runs at a reasonable speed (~18s), so it's something in that commit

Tracked as bluesky/ophyd-async#312

Will try and take a look this afternoon

from dodal.

coretl avatar coretl commented on August 10, 2024

Done in bluesky/ophyd-async#316

from dodal.

DominicOram avatar DominicOram commented on August 10, 2024

Confirmed this fixes the issue, thank you!

from dodal.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.