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

Reducing times for docs and testing #1482

Merged
merged 3 commits into from
Sep 15, 2022
Merged

Reducing times for docs and testing #1482

merged 3 commits into from
Sep 15, 2022

Conversation

germa89
Copy link
Collaborator

@germa89 germa89 commented Sep 9, 2022

We don't need to take that much time.

Close #1407
Close #1477

@github-actions github-actions bot added Documentation Documentation related (improving, adding, etc) Enhancement Improve any current implemented feature New Feature Request or proposal for a new feature labels Sep 9, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Sep 9, 2022

Please add one of the following labels to add this contribution to the Release Notes 👇

@codecov
Copy link

codecov bot commented Sep 9, 2022

Codecov Report

Merging #1482 (84c262e) into main (b67b2ce) will increase coverage by 0.02%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #1482      +/-   ##
==========================================
+ Coverage   80.32%   80.35%   +0.02%     
==========================================
  Files          43       43              
  Lines        6780     6779       -1     
==========================================
+ Hits         5446     5447       +1     
+ Misses       1334     1332       -2     

@germa89 germa89 marked this pull request as draft September 9, 2022 16:07
@germa89
Copy link
Collaborator Author

germa89 commented Sep 12, 2022

Benchmarking the doc building times

I used the nightly build CI.

Current main.

Link: https://github.com/pyansys/pymapdl/runs/8298445292?check_suite_focus=true
Total time (Building documentation step): 17min 21sec

Details

computation time summary:
    - ../../examples/02-geometry/03-volumes.py:                                                         160.33 sec   0.0 MB
    - ../../examples/00-mapdl-examples/2d_plate_with_a_hole.py:                                          52.57 sec   0.0 MB
    - ../../examples/00-mapdl-examples/cyclic_analysis.py:                                               43.78 sec   0.0 MB
    - ../../examples/00-mapdl-examples/exhaust_manifold_thermal_stress.py:                               25.42 sec   0.0 MB
    - ../../examples/02-geometry/04-primitives.py:                                                       21.21 sec   0.0 MB
    - ../../examples/00-mapdl-examples/geometry.py:                                                      18.56 sec   0.0 MB
    - ../../examples/01-apdlmath-examples/solve_dense_matrix.py:                                         15.59 sec   0.0 MB
    - ../../examples/00-mapdl-examples/pyvista_mesh.py:                                                  12.43 sec   0.0 MB
    - ../../examples/00-mapdl-examples/lathe_cutter.py:                                                   9.32 sec   0.0 MB
    - ../../examples/00-mapdl-examples/transient_thermal.py:                                              9.04 sec   0.0 MB
    - ../../examples/00-mapdl-examples/2d_pressure_vessel.py:                                             8.07 sec   0.0 MB
    - ../../examples/00-mapdl-examples/3d_notch.py:                                                       7.36 sec   0.0 MB
    - ../../examples/00-mapdl-examples/acoustic_analysis.py:                                              7.21 sec   0.0 MB
    - ../../examples/00-mapdl-examples/pressure_vessel.py:                                                7.16 sec   0.0 MB
    - ../../examples/01-apdlmath-examples/mapdl_vs_scipy.py:                                              6.17 sec   0.0 MB
    - ../../examples/02-geometry/01-lines.py:                                                             5.49 sec   0.0 MB

This branch

Link: https://github.com/pyansys/pymapdl/runs/8303148862?check_suite_focus=true
Total time (Building documentation step): 14m 22s

Details

computation time summary:
    - ../../examples/00-mapdl-examples/cyclic_analysis.py:                                              43.17 sec   0.0 MB
    - ../../examples/00-mapdl-examples/2d_plate_with_a_hole.py:                                         32.40 sec   0.0 MB
    - ../../examples/00-mapdl-examples/exhaust_manifold_thermal_stress.py:                              25.67 sec   0.0 MB
    - ../../examples/02-geometry/04-primitives.py:                                                      20.04 sec   0.0 MB
    - ../../examples/00-mapdl-examples/geometry.py:                                                     18.00 sec   0.0 MB
    - ../../examples/02-geometry/03-volumes.py:                                                         13.99 sec   0.0 MB
    - ../../examples/00-mapdl-examples/pyvista_mesh.py:                                                 12.08 sec   0.0 MB
    - ../../examples/00-mapdl-examples/lathe_cutter.py:                                                  9.26 sec   0.0 MB
    - ../../examples/00-mapdl-examples/transient_thermal.py:                                             9.09 sec   0.0 MB
    - ../../examples/00-mapdl-examples/2d_pressure_vessel.py:                                            7.87 sec   0.0 MB
    - ../../examples/00-mapdl-examples/pressure_vessel.py:                                               6.95 sec   0.0 MB
    - ../../examples/00-mapdl-examples/3d_notch.py:                                                      6.87 sec   0.0 MB
    - ../../examples/00-mapdl-examples/acoustic_analysis.py:                                             6.81 sec   0.0 MB
    - ../../examples/01-apdlmath-examples/mapdl_vs_scipy.py:                                             6.07 sec   0.0 MB
    - ../../examples/02-geometry/01-lines.py:                                                            5.15 sec   0.0 MB

I reduced 3 minutes in the overall step, I think it is fine. I don't think we should go very low in this.

@germa89
Copy link
Collaborator Author

germa89 commented Sep 12, 2022

Benchmarking the unit tests:

From previous runs:

22.15s call     tests/test_grpc.py::test_read_input_file[False-full26.dat]
19.17s call     tests/test_grpc.py::test_read_input_file[False-static.dat]
7.87s setup    tests/test_mapdl.py::test_get_variable_nsol_esol_wrappers[False]
3.59s setup    tests/test_commands.py::test_output_listing[False-prnsol-args0]
2.49s setup    tests/test_mesh_grpc.py::test_non_empty_mesh[False]
2.37s call     tests/test_grpc.py::test_download_project[False]
2.34s setup    tests/test_mesh_grpc.py::test_tshape_key[False]
2.31s setup    tests/test_post.py::test_time_values[False]
2.28s setup    tests/test_mesh_grpc.py::test_key_option[False]
2.27s setup    tests/test_post.py::test_nodal_contact_friction_stress[False]

This brach

============================== slowest durations ===============================
**3.82s call     tests/test_grpc.py::test_read_input_file[False-full26.dat]
2.32s setup    tests/test_commands.py::test_output_listing[False-prnsol-args0]
2.08s setup    tests/test_mesh_grpc.py::test_tshape_key[False]
1.91s call     tests/test_mapdl.py::test_cyclic_solve[False]
1.89s setup    tests/test_post.py::test_nodal_contact_friction_stress[False]
1.88s setup    tests/test_post.py::test_time_values[False]
1.87s setup    tests/test_post.py::test_plot_nodal_contact_friction_stress[False]
1.87s setup    tests/test_post.py::test_time_frequency_values[False]
1.85s setup    tests/test_post.py::test_plot_incomplete_element_selection[False]
1.85s setup    tests/test_post.py::test_plot_incomplete_nodal_selection[False]
1.84s setup    tests/test_mesh_grpc.py::test_non_empty_mesh[False]
1.83s setup    tests/test_mesh_grpc.py::test_key_option[False]
1.27s setup    tests/test_post.py::test_nodal_plastic_component_strain[False-X]
1.24s call     tests/test_math.py::test_matrix[False]
1.15s call     tests/test_grpc.py::test_cmatrix[False]
1.12s setup    tests/test_post.py::test_disp[False-X]
1.09s call     tests/test_grpc.py::test_read_input_file_verbose[False]
1.07s call     tests/test_mapdl.py::test_cdread_in_apdl_directory[False]
1.00s call     tests/test_mapdl.py::test_load_array[False-3-3]
0.97s call     tests/test_grpc.py::test_large_output[False]
0.91s call     tests/test_post.py::test_general_plotter_returns[False]
0.87s call     tests/test_grpc.py::test_clear_multiple[False]
0.71s call     tests/test_examples.py::test_bracket[False]
0.71s call     tests/test_misc.py::test_plain_report
**0.69s call     tests/test_grpc.py::test_read_input_file[False-static.dat]
0.63s call     tests/test_mapdl.py::test_input_strings[False]
0.61s call     tests/test_mapdl.py::test_cdread_in_python_directory[False]
0.51s call     tests/test_parameters.py::test__get_parameter_array[False-1e+21]
0.49s call     tests/test_parameters.py::test__get_parameter_array[False-1e+51]
0.47s call     tests/test_database.py::test_database_start_stop[False]
0.46s call     tests/test_parameters.py::test__get_parameter_array[False-1e+61]
0.43s call     tests/test_mapdl.py::test_cdread[False]
0.43s call     tests/test_post.py::test_disp_plot[False-X]
0.40s call     tests/test_parameters.py::test__get_parameter_array[False-1e+31]
0.39s call     tests/test_mapdl.py::test_plot_empty_mesh[False]
0.38s call     tests/test_plotting.py::test_pick_node_special_cases[False]
0.37s call     tests/test_post.py::test_plot_element_temperature[False]
0.36s call     tests/test_mapdl.py::test_mpfunctions[False]
0.35s call     tests/test_plotting.py::test_pick_kp[False-S]
0.35s call     tests/test_post.py::test_disp_plot_subselection[False]
0.33s call     tests/test_mapdl.py::test_load_array_failure_types[False-array0]
**0.33s call     tests/test_mapdl.py::test_get_variable_nsol_esol_wrappers[False]
0.33s call     tests/test_parameters.py::test__get_parameter_array[False-100000000000.0]
0.32s setup    tests/test_element.py::test_esol[False]
0.32s call     tests/test_mapdl.py::test_multiline_fail[False]
0.31s call     tests/test_plotting.py::test_pick_kp[False-R]
0.31s setup    tests/test_mapdl.py::test_get_variable_nsol_esol_wrappers[False]

Notes

  • The file static.dat is NOT solved, I think it does not make sense to solve, since we cannot check the solution is correct and we are testing reading the input.
  • The nsol has been reduced by doing /EOF after the first solve.

@germa89
Copy link
Collaborator Author

germa89 commented Sep 12, 2022

Since we have shorten the solve outputs, we should see an improvement on the test mentioned in #1477.

@germa89 germa89 marked this pull request as ready for review September 12, 2022 15:59
Copy link
Collaborator Author

@germa89 germa89 left a comment

Choose a reason for hiding this comment

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

LGTM.

@germa89 germa89 merged commit 5958b76 into main Sep 15, 2022
@germa89 germa89 deleted the feat/reducing-times branch September 15, 2022 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Documentation related (improving, adding, etc) Enhancement Improve any current implemented feature New Feature Request or proposal for a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unstable unit test Reduce documentation building time
1 participant