Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speed up test_car_interfaces.py #34339

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Speed up test_car_interfaces.py #34339

wants to merge 2 commits into from

Conversation

JIBSIL
Copy link

@JIBSIL JIBSIL commented Jan 8, 2025

This PR pertains to this bounty: #32536

Description

Decreases the time taken for testing test_car_interfaces.py from ~3s max initially, 1.5-2s for the longest tests, to 1s max and 0.3s for the longest tests.

List of changes:

  • Decreased max_examples from 60 to 20. This doesn't seem like it causes any difference in test coverage.
  • Made the params strategy global, this shouldn't cause problems because the fingerprints are sampled randomly anyway
  • Decreased the two car control tests to 4 iterations rather than 10

Verification

On my machine these fixes bring it within the max tolerance for time specified in the original issue:

(openpilot) (base) jibsil@DESKTOP:~/OP/openpilot$ pytest --durations=0 selfdrive/car/tests/test_car_interfaces.py
=========================================================================================== test session starts ===========================================================================================
platform linux -- Python 3.12.7, pytest-8.3.4, pluggy-1.5.0
Using --randomly-seed=3142337600
rootdir: /home/jibsil/OP/openpilot
configfile: pyproject.toml
plugins: cpp-2.6.0, hypothesis-6.47.5, randomly-3.16.0, cov-6.0.0, mock-3.14.0, subtests-0.14.1, timeout-2.3.1, repeat-0.9.3, asyncio-0.25.1, xdist-3.6.1
asyncio: mode=Mode.STRICT, asyncio_default_fixture_loop_scope=function
4 workers [217 items]   
................................................................................................................................................................................................... [ 89%]
......................                                                                                                                                                                              [100%]
============================================================================================ slowest durations ============================================================================================
1.01s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_003_AUDI_A3_MK3
0.97s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_029_FORD_FOCUS_MK4
0.95s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_012_CADILLAC_XT4
0.89s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_028_FORD_EXPLORER_MK6
0.89s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_001_ACURA_RDX
0.87s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_027_FORD_ESCAPE_MK4
0.85s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_014_CHEVROLET_EQUINOX
0.84s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_026_FORD_BRONCO_SPORT_MK1
0.80s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_000_ACURA_ILX
0.76s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_002_ACURA_RDX_3G
0.72s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_022_CHRYSLER_PACIFICA_2019_HYBRID
0.68s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_034_FORD_RANGER_MK2
0.66s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_023_CHRYSLER_PACIFICA_2020
0.66s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_077_HYUNDAI_IONIQ_EV_2020
0.66s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_018_CHEVROLET_VOLT
0.66s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_064_HONDA_PILOT
0.65s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_016_CHEVROLET_SILVERADO
0.65s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_033_FORD_MUSTANG_MACH_E_MK1
0.63s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_019_CHEVROLET_VOLT_2019
0.61s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_032_FORD_MAVERICK_MK1
0.61s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_065_HONDA_RIDGELINE
0.61s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_075_HYUNDAI_IONIQ_5
0.60s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_004_AUDI_Q2_MK1
0.60s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_017_CHEVROLET_TRAVERSE
0.60s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_031_FORD_F_150_MK14
0.58s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_044_GMC_ACADIA
0.57s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_054_HONDA_CRV_EU
0.57s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_006_BUICK_LACROSSE
0.57s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_005_AUDI_Q3_MK2
0.57s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_078_HYUNDAI_IONIQ_EV_LTD
0.57s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_066_HYUNDAI_AZERA_6TH_GEN
0.55s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_015_CHEVROLET_MALIBU
0.55s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_049_HONDA_CIVIC_2022
0.55s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_076_HYUNDAI_IONIQ_6
0.54s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_072_HYUNDAI_ELANTRA_HEV_2021
0.54s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_059_HONDA_HRV
0.53s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_030_FORD_F_150_LIGHTNING_MK1
0.53s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_050_HONDA_CIVIC_BOSCH
0.52s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_055_HONDA_CRV_HYBRID
0.52s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_079_HYUNDAI_IONIQ_HEV_2022
0.52s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_052_HONDA_CRV
0.51s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_080_HYUNDAI_IONIQ_PHEV
0.51s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_036_GENESIS_G70_2020
0.50s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_063_HONDA_ODYSSEY_CHN
0.50s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_007_BUICK_REGAL
0.50s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_051_HONDA_CIVIC_BOSCH_DIESEL
0.50s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_056_HONDA_E
0.50s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_201_VOLKSWAGEN_CADDY_MK3
0.50s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_073_HYUNDAI_GENESIS
0.49s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_096_HYUNDAI_STARIA_4TH_GEN
0.49s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_037_GENESIS_G80
0.49s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_047_HONDA_ACCORD
0.49s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_074_HYUNDAI_IONIQ
0.48s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_035_GENESIS_G70
0.48s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_060_HONDA_HRV_3G
0.48s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_024_COMMA_BODY
0.48s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_020_CHRYSLER_PACIFICA_2018
0.48s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_205_VOLKSWAGEN_JETTA_MK7
0.48s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_200_VOLKSWAGEN_ATLAS_MK1
0.47s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_061_HONDA_INSIGHT
0.47s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_021_CHRYSLER_PACIFICA_2018_HYBRID
0.47s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_013_CHEVROLET_BOLT_EUV
0.47s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_071_HYUNDAI_ELANTRA_GT_I30
0.46s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_094_HYUNDAI_SONATA_HYBRID
0.46s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_046_HOLDEN_ASTRA
0.46s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_097_HYUNDAI_TUCSON
0.46s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_203_VOLKSWAGEN_GOLF_MK7
0.45s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_091_HYUNDAI_SANTA_FE_HEV_2022
0.45s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_053_HONDA_CRV_5G
0.45s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_204_VOLKSWAGEN_JETTA_MK6
0.45s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_043_GENESIS_GV80
0.45s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_202_VOLKSWAGEN_CRAFTER_MK2
0.44s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_192_TOYOTA_RAV4H
0.44s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_193_TOYOTA_RAV4_PRIME
0.44s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_067_HYUNDAI_AZERA_HEV_6TH_GEN
0.43s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_057_HONDA_FIT
0.43s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_198_TOYOTA_SIENNA_4TH_GEN
0.43s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_069_HYUNDAI_ELANTRA
0.43s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_062_HONDA_ODYSSEY
0.43s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_087_HYUNDAI_PALISADE
0.43s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_095_HYUNDAI_SONATA_LF
0.43s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_199_VOLKSWAGEN_ARTEON_MK1
0.43s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_042_GENESIS_GV70_ELECTRIFIED_1ST_GEN
0.43s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_045_GMC_YUKON
0.42s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_048_HONDA_CIVIC
0.42s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_038_GENESIS_G80_2ND_GEN_FL
0.42s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_093_HYUNDAI_SONATA
0.42s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_008_CADILLAC_ATS
0.41s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_068_HYUNDAI_CUSTIN_1ST_GEN
0.41s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_208_VOLKSWAGEN_POLO_MK6
0.41s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_041_GENESIS_GV70_1ST_GEN
0.40s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_010_CADILLAC_ESCALADE_ESV
0.40s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_092_HYUNDAI_SANTA_FE_PHEV_2022
0.40s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_058_HONDA_FREED
0.40s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_172_SUBARU_OUTBACK_PREGLOBAL_2018
0.39s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_159_SUBARU_ASCENT_2023
0.39s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_039_GENESIS_G90
0.39s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_209_VOLKSWAGEN_SHARAN_MK2
0.39s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_081_HYUNDAI_IONIQ_PHEV_2019
0.39s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_082_HYUNDAI_KONA
0.39s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_089_HYUNDAI_SANTA_FE
0.39s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_211_VOLKSWAGEN_TCROSS_MK1
0.39s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_125_KIA_STINGER_2022
0.39s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_098_HYUNDAI_TUCSON_4TH_GEN
0.38s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_025_DODGE_DURANGO
0.38s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_040_GENESIS_GV60_EV_1ST_GEN
0.38s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_107_KIA_K5_HEV_2020
0.37s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_070_HYUNDAI_ELANTRA_2021
0.37s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_109_KIA_NIRO_EV
0.37s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_111_KIA_NIRO_HEV_2021
0.37s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_206_VOLKSWAGEN_PASSAT_MK8
0.37s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_126_LEXUS_CTH
0.37s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_009_CADILLAC_ESCALADE
0.37s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_176_TOYOTA_AVALON
0.36s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_207_VOLKSWAGEN_PASSAT_NMS
0.36s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_210_VOLKSWAGEN_TAOS_MK1
0.36s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_214_VOLKSWAGEN_TRANSPORTER_T61
0.36s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_151_SEAT_ATECA_MK1
0.36s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_103_KIA_CEED
0.36s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_090_HYUNDAI_SANTA_FE_2022
0.36s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_194_TOYOTA_RAV4_TSS2
0.36s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_115_KIA_OPTIMA_G4
0.36s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_173_TESLA_MODEL_3
0.36s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_120_KIA_SORENTO
0.35s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_114_KIA_NIRO_PHEV_2022
0.35s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_215_VOLKSWAGEN_TROC_MK1
0.35s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_149_RAM_1500_5TH_GEN
0.34s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_099_HYUNDAI_VELOSTER
0.34s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_195_TOYOTA_RAV4_TSS2_2022
0.34s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_108_KIA_K8_HEV_1ST_GEN
0.34s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_152_SKODA_FABIA_MK4
0.34s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_196_TOYOTA_RAV4_TSS2_2023
0.34s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_213_VOLKSWAGEN_TOURAN_MK2
0.34s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_011_CADILLAC_ESCALADE_ESV_2019
0.34s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_212_VOLKSWAGEN_TIGUAN_MK2
0.34s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_113_KIA_NIRO_PHEV
0.34s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_191_TOYOTA_RAV4
0.34s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_134_LEXUS_NX_TSS2
0.34s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_083_HYUNDAI_KONA_EV
0.33s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_086_HYUNDAI_KONA_HEV
0.33s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_131_LEXUS_IS_TSS2
0.33s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_197_TOYOTA_SIENNA
0.33s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_084_HYUNDAI_KONA_EV_2022
0.33s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_158_SUBARU_ASCENT
0.33s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_153_SKODA_KAMIQ_MK1
0.33s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_106_KIA_K5_2021
0.33s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_132_LEXUS_LC_TSS2
0.33s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_101_JEEP_GRAND_CHEROKEE_2019
0.33s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_156_SKODA_OCTAVIA_MK3
0.33s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_147_NISSAN_ROGUE
0.32s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_141_MAZDA_CX5_2022
0.32s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_116_KIA_OPTIMA_G4_FL
0.32s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_189_TOYOTA_PRIUS_TSS2
0.32s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_121_KIA_SORENTO_4TH_GEN
0.32s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_169_SUBARU_OUTBACK
0.32s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_182_TOYOTA_CHR_TSS2
0.32s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_118_KIA_OPTIMA_H_G4_FL
0.32s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_157_SKODA_SUPERB_MK3
0.32s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_148_NISSAN_XTRAIL
0.32s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_142_MAZDA_CX9
0.31s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_128_LEXUS_ES_TSS2
0.31s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_160_SUBARU_CROSSTREK_HYBRID
0.31s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_133_LEXUS_NX
0.31s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_102_KIA_CARNIVAL_4TH_GEN
0.31s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_154_SKODA_KAROQ_MK1
0.31s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_129_LEXUS_GS_F
0.31s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_150_RAM_HD_5TH_GEN
0.31s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_185_TOYOTA_HIGHLANDER
0.31s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_184_TOYOTA_COROLLA_TSS2
0.31s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_135_LEXUS_RC
0.31s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_174_TESLA_MODEL_Y
0.31s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_188_TOYOTA_PRIUS
0.31s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_143_MAZDA_CX9_2021
0.31s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_124_KIA_STINGER
0.30s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_180_TOYOTA_CAMRY_TSS2
0.30s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_144_NISSAN_ALTIMA
0.30s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_145_NISSAN_LEAF
0.30s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_088_HYUNDAI_SANTA_CRUZ_1ST_GEN
0.30s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_127_LEXUS_ES
0.30s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_119_KIA_SELTOS
0.30s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_085_HYUNDAI_KONA_EV_2ND_GEN
0.30s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_105_KIA_FORTE
0.30s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_136_LEXUS_RX
0.30s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_112_KIA_NIRO_HEV_2ND_GEN
0.30s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_138_MAZDA_3
0.30s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_146_NISSAN_LEAF_IC
0.29s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_140_MAZDA_CX5
0.29s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_170_SUBARU_OUTBACK_2023
0.29s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_178_TOYOTA_AVALON_TSS2
0.29s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_117_KIA_OPTIMA_H
0.29s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_137_LEXUS_RX_TSS2
0.29s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_187_TOYOTA_MIRAI
0.28s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_155_SKODA_KODIAQ_MK1
0.28s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_161_SUBARU_FORESTER
0.28s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_122_KIA_SORENTO_HEV_4TH_GEN
0.28s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_162_SUBARU_FORESTER_2022
0.28s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_110_KIA_NIRO_EV_2ND_GEN
0.28s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_179_TOYOTA_CAMRY
0.28s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_123_KIA_SPORTAGE_5TH_GEN
0.28s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_164_SUBARU_FORESTER_PREGLOBAL
0.28s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_130_LEXUS_IS
0.28s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_104_KIA_EV6
0.28s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_167_SUBARU_LEGACY
0.28s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_171_SUBARU_OUTBACK_PREGLOBAL
0.27s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_163_SUBARU_FORESTER_HYBRID
0.27s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_100_JEEP_GRAND_CHEROKEE
0.27s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_165_SUBARU_IMPREZA
0.27s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_181_TOYOTA_CHR
0.26s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_190_TOYOTA_PRIUS_V
0.26s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_177_TOYOTA_AVALON_2019
0.26s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_175_TOYOTA_ALPHARD_TSS2
0.26s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_168_SUBARU_LEGACY_PREGLOBAL
0.26s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_186_TOYOTA_HIGHLANDER_TSS2
0.25s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_183_TOYOTA_COROLLA
0.25s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_139_MAZDA_6
0.24s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_166_SUBARU_IMPREZA_2020
0.17s call     selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_216_MOCK
0.02s setup    selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_000_ACURA_ILX
0.01s setup    selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_003_AUDI_A3_MK3
0.01s teardown selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_015_CHEVROLET_MALIBU
0.01s setup    selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_028_FORD_EXPLORER_MK6
0.01s setup    selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_029_FORD_FOCUS_MK4
0.01s teardown selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_216_MOCK
0.01s setup    selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_052_HONDA_CRV
0.01s setup    selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_211_VOLKSWAGEN_TCROSS_MK1
0.01s teardown selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_077_HYUNDAI_IONIQ_EV_2020
0.01s setup    selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_059_HONDA_HRV
0.01s teardown selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_056_HONDA_E
0.01s teardown selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_032_FORD_MAVERICK_MK1
0.01s setup    selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_038_GENESIS_G80_2ND_GEN_FL
0.01s teardown selfdrive/car/tests/test_car_interfaces.py::TestCarInterfaces::test_car_interfaces_094_HYUNDAI_SONATA_HYBRID

(420 durations < 0.005s hidden.  Use -vv to show these durations.)
========================================================================================== 217 passed in 26.69s ===========================================================================================

@github-actions github-actions bot added CI / testing car vehicle-specific labels Jan 8, 2025
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for contributing to openpilot! In order for us to review your PR as quickly as possible, check the following:

  • Convert your PR to a draft unless it's ready to review
  • Read the contributing docs
  • Before marking as "ready for review", ensure:
    • the goal is clearly stated in the description
    • all the tests are passing
    • the change is something we merge
    • include a route or your device' dongle ID if relevant

@maxime-desroches
Copy link
Contributor

maxime-desroches commented Jan 8, 2025

For those types of speedup issues, please post a clear before and after benchmark of the required metrics (in this case we need the average duration + maximum duration on a Github runner, not on your local machine).

ALL_ECUS = {ecu for ecus in FW_VERSIONS.values() for ecu in ecus.keys()}
ALL_ECUS |= {ecu for config in FW_QUERY_CONFIGS.values() for ecu in config.extra_ecus}

ALL_REQUESTS = {tuple(r.request) for config in FW_QUERY_CONFIGS.values() for r in config.requests}

MAX_EXAMPLES = int(os.environ.get('MAX_EXAMPLES', '60'))
MAX_EXAMPLES = int(os.environ.get('MAX_EXAMPLES', '20'))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This won't affect the test coverage in CI (or the speed of the tests) since we already specify the MAX_EXAMPLES in our yaml, but it will if you run this test outside of CI.

Even though it won't technically reduce coverage, this change kind of goes against the requirements of the issue, since we explicitly specify "with the same test coverage".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
car vehicle-specific CI / testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants