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

Test automation program spends too much time #53

Open
samchon opened this issue Dec 11, 2019 · 2 comments
Open

Test automation program spends too much time #53

samchon opened this issue Dec 11, 2019 · 2 comments
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request help wanted Extra attention is needed
Projects

Comments

@samchon
Copy link
Owner

samchon commented Dec 11, 2019

The test automation program executed by npm run test, it spends too much time (over 20 seconds). To reduce the elapsed time, the first mission is to measuring elapsed time of each feature. After the measurement, I'll optimize long-time consuming features.

@samchon samchon added the enhancement New feature or request label Dec 11, 2019
@samchon samchon self-assigned this Dec 11, 2019
samchon pushed a commit that referenced this issue Dec 11, 2019
@samchon samchon changed the title test automation prints elapsed time for each function Test automation program spends too much time Dec 12, 2019
@samchon samchon added bug Something isn't working documentation Improvements or additions to documentation help wanted Extra attention is needed and removed bug Something isn't working labels Dec 12, 2019
@samchon samchon added this to To do in v2.4 Update Dec 12, 2019
@samchon samchon moved this from To do to In progress in v2.4 Update Dec 12, 2019
@samchon
Copy link
Owner Author

samchon commented Dec 12, 2019

Elapsed times

Looking at the below result and traveling the long-timed elapsed features, I could find two common things. To resolve that, I should re-design such long-time spending test features.

  • Test with random generator and supplement the uncertainty with numerous repeating
  • Sleep too much time for testing critical section
> tstl@2.4.0-dev.20191213 test /Users/samchon/Documents/samchon/tstl
> node test

==========================================================
 TSTL Test Automation Program
==========================================================
  - test_binary_searches: 94 ms
  - test_heaps: 20 ms
  - test_iterations: 4 ms
  - test_mathmatics: 3 ms
  - test_modifiers: 15 ms
  - test_partitions: 1 ms
  - test_randoms: 228 ms
  - test_sortings: 30 ms
  - test_union_sets: 0 ms
  - test_priority_queue: 11 ms
  - test_adaptors: 1 ms
  - test_associatives: 21 ms
  - test_for_of_iterations: 2 ms
  - test_linear_containers: 1 ms
  - test_lists: 2 ms
  - test_swaps: 13 ms
  - test_trees: 8,901 ms
  - test_vector_bools: 418 ms
  - test_exception_names: 0 ms
  - test_terminate: 1 ms
  - test_comparisons: 5 ms
  - test_inserters: 0 ms
  - test_numeric_algorithms: 1 ms
  - test_special_maths: 2,028 ms
  - test_iterations: 0 ms
  - test_condition_variables: 821 ms
  - test_mutexes: 1,309 ms
  - test_unique_locks: 3 ms
  - test_shared_locks: 1 ms
  - test_semaphores: 331 ms
  - test_shared_mutexes: 5,331 ms
  - test_sleeps: 1,007 ms
  - test_utilities: 0 ms
----------------------------------------------------------
Success
  - elapsed time: 20,713 ms
  - rss: 72.29 MB
  - heapTotal: 41.81 MB
  - heapUsed: 16.65 MB
  - external: 0.79 MB
----------------------------------------------------------

samchon pushed a commit that referenced this issue Dec 24, 2019
@samchon samchon moved this from In progress to Done in v2.4 Update Jan 10, 2020
@samchon samchon moved this from Done to In progress in v2.4 Update Mar 4, 2020
@chinesedfan
Copy link

Any interests to introduce test frameworks, like jest or ava?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request help wanted Extra attention is needed
Projects
v2.4 Update
  
In progress
Development

No branches or pull requests

2 participants