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

[perf] network module #8392

Merged
merged 1 commit into from
Jun 13, 2019
Merged

[perf] network module #8392

merged 1 commit into from
Jun 13, 2019

Conversation

rasom
Copy link
Contributor

@rasom rasom commented Jun 10, 2019

please review only the last commit

status-im.screens.ui.network.* was moved to status-im.network.ui.*
accounts module was a bit rearranged in order to fix cyclic deps s.utils.handlers -> s.accounts.db -> s.newtork.module -> s.network.events -> s.utils.handlers

status: ready

@rasom rasom requested review from antdanchenko, churik and a team as code owners June 10, 2019 05:30
@status-github-bot
Copy link

Pull Request Checklist

  • Have you updated the documentation, if impacted (e.g. docs.status.im)?

@status-im-auto
Copy link
Member

status-im-auto commented Jun 10, 2019

Jenkins Builds

Click to see older builds (21)
Commit #️⃣ Finished (UTC) Duration Platform Result
816c0b5 #1 2019-06-10 05:36:48 ~5 min macos 📄 log
816c0b5 #1 2019-06-10 05:36:55 ~5 min windows 📄 log
816c0b5 #1 2019-06-10 05:37:08 ~6 min linux 📄 log
✔️ 816c0b5 #1 2019-06-10 05:45:23 ~14 min android 📦 apk
✔️ 816c0b5 #1 2019-06-10 05:45:26 ~14 min ios 📦 ipa
✔️ 816c0b5 #1 2019-06-10 05:45:48 ~14 min android-e2e 📦 apk
✔️ 9f933de #2 2019-06-10 06:18:35 ~13 min ios 📦 ipa
✔️ 9f933de #2 2019-06-10 06:19:45 ~15 min android-e2e 📦 apk
✔️ 9f933de #2 2019-06-10 06:19:57 ~15 min android 📦 apk
✔️ 9f933de #2 2019-06-10 06:20:36 ~15 min linux 📦 App
✔️ b994d2a #3 2019-06-10 06:36:22 ~15 min android-e2e 📦 apk
✔️ b994d2a #3 2019-06-10 06:37:47 ~16 min linux 📦 App
✔️ b994d2a #3 2019-06-10 06:38:29 ~17 min macos 📦 dmg
✔️ b994d2a #3 2019-06-10 06:38:48 ~17 min android 📦 apk
✔️ b994d2a #3 2019-06-10 06:46:06 ~24 min windows 📦 exe
✔️ e0244ec #4 2019-06-10 18:28:11 ~13 min ios 📦 ipa
✔️ e0244ec #4 2019-06-10 18:32:41 ~17 min macos 📦 dmg
✔️ e0244ec #4 2019-06-10 18:33:03 ~18 min android 📦 apk
✔️ e0244ec #4 2019-06-10 18:33:09 ~18 min android-e2e 📦 apk
✔️ e0244ec #4 2019-06-10 18:39:55 ~25 min linux 📦 App
✔️ e0244ec #4 2019-06-10 18:41:30 ~26 min windows 📦 exe
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 7590c80 #5 2019-06-11 13:07:42 ~12 min ios 📦 ipa
✔️ 7590c80 #5 2019-06-11 13:11:17 ~15 min macos 📦 dmg
✔️ 7590c80 #5 2019-06-11 13:19:52 ~24 min android 📦 apk
✔️ 7590c80 #5 2019-06-11 13:20:53 ~25 min android-e2e 📦 apk
✔️ 7590c80 #5 2019-06-11 13:23:23 ~27 min linux 📦 App
✔️ 7590c80 #5 2019-06-11 13:23:53 ~28 min windows 📦 exe
✔️ 908f730 #6 2019-06-13 06:44:56 ~11 min android 📦 apk
✔️ 908f730 #6 2019-06-13 06:46:47 ~13 min ios 📦 ipa
✔️ 908f730 #6 2019-06-13 06:47:00 ~13 min android-e2e 📦 apk
✔️ 908f730 #6 2019-06-13 06:47:36 ~13 min linux 📦 App
✔️ 908f730 #6 2019-06-13 06:48:31 ~14 min windows 📦 exe
✔️ 908f730 #6 2019-06-13 06:49:47 ~16 min macos 📦 dmg

@rasom rasom force-pushed the network-module branch 2 times, most recently from 9f933de to b994d2a Compare June 10, 2019 06:21
@rasom rasom self-assigned this Jun 10, 2019
@status-im-auto
Copy link
Member

✔️ status-react/prs/ios/PR-8392#3 🔹 ~15 min 🔹 b994d2a 🔹 📦 ios package

@@ -0,0 +1,20 @@
(ns status-im.accounts.model
Copy link
Member

Choose a reason for hiding this comment

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

i believe usually we use core name

Copy link
Contributor Author

Choose a reason for hiding this comment

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

not really, the code from db ns was moved there in order to solve circular dependency. It is "must contain getter and setter functions used by fx producing functions and subscriptions" from https://github.com/status-im/status-react/blob/develop/doc/codebase-structure-and-guidelines.md , which has no real reason to be in the same ns with specs. I can rename it differently if you have some ideas.

[re-frame.core :as re-frame]
[status-im.utils.utils :as utils]))

(handlers/register-handler-fx
Copy link
Member

Choose a reason for hiding this comment

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

with new fx/defn we don't need to separate events anymore, just use {:events []} in fx/defn and you can move all these handlers to core

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The whole objective was rather to rearrange code so that it can be compiled as a module, not to rewrite it. I know about this but it can be rewritten later if necessary.

;; Preloaded handlers, subs, functions

(re-frame/reg-sub
:get-network-id
Copy link
Member

Choose a reason for hiding this comment

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

why this sub is here not in subs?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

because this sub is needed outside of module right after logging in, when the rest of module's namespaces can still wait to be loaded. It could be put into a separate ns, but wouldn't make too much difference.

@rasom rasom requested a review from cammellos June 12, 2019 07:49
@statustestbot
Copy link

66% of end-end tests have passed

Total executed tests: 47
Failed tests: 16
Passed tests: 31

Failed tests (16)

Click to expand
1. test_block_user_from_public_chat

Device 1: Tap 'Confirm' on native keyboard
Device 1: Wait for ChatMessageInput

Device 2: 'PlusButton' is not found on the screen, also Unexpected Alert is shown: 'Array size is not a small enough positive integer.'

Device sessions

2. test_send_transaction_from_daap

Device 1: Tap on AssetsButton
Device 1: Tap on RequestSTTButton

Device 1: 'SignWithPasswordButton' is not found on the screen

Device sessions

3. test_request_and_receive_tokens_in_1_1_chat

Device 1: Tap on SendMessageButton
Device 1: Wait for SignTransactionButton

Device 1: 'SignWithPasswordButton' is not found on the screen

Device sessions

4. test_deploy_contract_from_daap

Device 1: Tap on TransactionsButton
Device 1: Tap on DeployContractButton

Device 1: 'SignWithPasswordButton' is not found on the screen

Device sessions

5. test_logcat_send_transaction_from_daap

Device 1: Tap on AssetsButton
Device 1: Tap on RequestSTTButton

Device 1: 'SignWithPasswordButton' is not found on the screen

Device sessions

6. test_logcat_send_transaction_from_wallet

Device 1: Tap on DoneButton
Device 1: Tap on SignTransactionButton

Device 1: 'SignWithPasswordButton' is not found on the screen

Device sessions

7. test_send_token_with_7_decimals

Device 1: Tap on DoneButton
Device 1: Tap on SignTransactionButton

Device 1: 'SignWithPasswordButton' is not found on the screen

Device sessions

8. test_send_eth_from_wallet_to_address

Device 1: Tap on DoneButton
Device 1: Tap on SignTransactionButton

Device 1: 'SignWithPasswordButton' is not found on the screen

Device sessions

9. test_logcat_send_transaction_in_1_1_chat

Device 1: Tap on SendMessageButton
Device 1: Wait for SignWithPasswordButton

Device 1: 'SignWithPasswordButton' is not found on the screen

Device sessions

10. test_request_and_receive_eth_in_1_1_chat

Device 1: Tap on SendMessageButton
Device 1: Wait for SignTransactionButton

Device 1: 'SignWithPasswordButton' is not found on the screen

Device sessions

11. test_send_tokens_in_1_1_chat

Device 1: Tap on SendMessageButton
Device 1: Wait for SignWithPasswordButton

Device 1: 'SignWithPasswordButton' is not found on the screen

Device sessions

12. test_network_mismatch_for_send_request_commands

Device 1: Tap on SendMessageButton
Device 1: Wait for SignWithPasswordButton

Device 1: 'SignWithPasswordButton' is not found on the screen

Device sessions

13. test_send_stt_from_wallet

Device 1: Tap on DoneButton
Device 1: Tap on SignTransactionButton

Device 1: 'SignWithPasswordButton' is not found on the screen

Device sessions

14. test_send_eth_from_wallet_to_contact

Device 1: Looking for an element by text: 'Little Weighty Iberianmole'
Device 1: Tap on SignTransactionButton

Device 1: 'SignWithPasswordButton' is not found on the screen

Device sessions

15. test_send_two_transactions_one_after_another_in_dapp

Device 1: Tap on AllowButton
Device 1: Tap on TransactionsButton

Device 1: 'SignWithPasswordButton' is not found on the screen

Device sessions

16. test_backup_recovery_phrase_warning_from_wallet

Device 1: Wait for PlusButton
Device 1: Wait for PlusButton

Donation was not received during 300 seconds!

Device sessions

Passed tests (31)

Click to expand
1. test_filters_from_daap
Device sessions

2. test_copy_and_paste_messages
Device sessions

3. test_open_transaction_on_etherscan
Device sessions

4. test_public_chat_messaging
Device sessions

5. test_long_press_to_delete_1_1_chat
Device sessions

6. test_password_in_logcat_sign_in
Device sessions

7. test_text_message_1_1_chat
Device sessions

8. test_add_to_contacts
Device sessions

9. test_sign_typed_message (TestRail link is not found)
Device sessions

10. test_unread_messages_counter_1_1_chat
Device sessions

11. test_send_message_in_group_chat
Device sessions

12. test_manage_assets
Device sessions

13. test_long_press_to_delete_public_chat
Device sessions

14. test_send_emoji
Device sessions

15. test_search_chat_on_home
Device sessions

16. test_logcat_recovering_account
Device sessions

17. test_messaging_in_different_networks
Device sessions

18. test_logcat_sign_message_from_daap
Device sessions

19. test_switch_users_and_add_new_account
Device sessions

20. test_login_with_new_account
Device sessions

21. test_add_contact_from_public_chat
Device sessions

22. test_password_in_logcat_creating_account
Device sessions

23. test_backup_recovery_phrase
Device sessions

24. test_offline_status
Device sessions

25. test_open_google_com_via_open_dapp
Device sessions

26. test_unread_messages_counter_public_chat
Device sessions

27. test_sign_message_from_daap
Device sessions

28. test_user_can_remove_profile_picture
Device sessions

29. test_share_contact_code_and_wallet_address
Device sessions

30. test_request_eth_in_wallet
Device sessions

31. test_refresh_button_browsing_app_webview
Device sessions

@asemiankevich asemiankevich self-assigned this Jun 13, 2019
@asemiankevich
Copy link
Contributor

@rasom would you mind to rebase please? We have new sign txn screen in develop, this is the reason for autotests to fail. Thank you!

@rasom
Copy link
Contributor Author

rasom commented Jun 13, 2019

@asemiankevich it was rebased before your comment

@statustestbot
Copy link

68% of end-end tests have passed

Total executed tests: 47
Failed tests: 15
Passed tests: 32

Failed tests (15)

Click to expand
1. test_send_transaction_from_daap

Device 1: Tap on AssetsButton
Device 1: Tap on RequestSTTButton

Device 1: 'SignWithPasswordButton' is not found on the screen

Device sessions

2. test_request_and_receive_tokens_in_1_1_chat

Device 1: Tap on SendMessageButton
Device 1: Wait for SignTransactionButton

Device 1: 'SignWithPasswordButton' is not found on the screen

Device sessions

3. test_deploy_contract_from_daap

Device 1: Tap on TransactionsButton
Device 1: Tap on DeployContractButton

Device 1: 'SignWithPasswordButton' is not found on the screen

Device sessions

4. test_public_chat_messaging

Device 2: Looking for message with text 'hello'
Device 2: Looking for an element by text: 'Today'

Device 2: 'BaseButton' is not found on the screen

Device sessions

5. test_logcat_send_transaction_from_daap

Device 1: Tap on AssetsButton
Device 1: Tap on RequestSTTButton

Device 1: 'SignWithPasswordButton' is not found on the screen

Device sessions

6. test_logcat_send_transaction_from_wallet

Device 1: Tap on DoneButton
Device 1: Tap on SignTransactionButton

Device 1: 'SignWithPasswordButton' is not found on the screen

Device sessions

7. test_send_token_with_7_decimals

Device 1: Tap on DoneButton
Device 1: Tap on SignTransactionButton

Device 1: 'SignWithPasswordButton' is not found on the screen

Device sessions

8. test_send_eth_from_wallet_to_address

Device 1: Tap on DoneButton
Device 1: Tap on SignTransactionButton

Device 1: 'SignWithPasswordButton' is not found on the screen

Device sessions

9. test_logcat_send_transaction_in_1_1_chat

Device 1: Tap on SendMessageButton
Device 1: Wait for SignWithPasswordButton

Device 1: 'SignWithPasswordButton' is not found on the screen

Device sessions

10. test_request_and_receive_eth_in_1_1_chat

Device 1: Tap on SendMessageButton
Device 1: Wait for SignTransactionButton

Device 1: 'SignWithPasswordButton' is not found on the screen

Device sessions

11. test_send_tokens_in_1_1_chat

Device 1: Tap on SendMessageButton
Device 1: Wait for SignWithPasswordButton

Device 1: 'SignWithPasswordButton' is not found on the screen

Device sessions

12. test_network_mismatch_for_send_request_commands

Device 1: Tap on SendMessageButton
Device 1: Wait for SignWithPasswordButton

Device 1: 'SignWithPasswordButton' is not found on the screen

Device sessions

13. test_send_stt_from_wallet

Device 1: Tap on DoneButton
Device 1: Tap on SignTransactionButton

Device 1: 'SignWithPasswordButton' is not found on the screen

Device sessions

14. test_send_eth_from_wallet_to_contact

Device 1: Looking for an element by text: 'Little Weighty Iberianmole'
Device 1: Tap on SignTransactionButton

Device 1: 'SignWithPasswordButton' is not found on the screen

Device sessions

15. test_send_two_transactions_one_after_another_in_dapp

Device 1: Tap on AllowButton
Device 1: Tap on TransactionsButton

Device 1: 'SignWithPasswordButton' is not found on the screen

Device sessions

Passed tests (32)

Click to expand
1. test_block_user_from_public_chat
Device sessions

2. test_filters_from_daap
Device sessions

3. test_copy_and_paste_messages
Device sessions

4. test_open_transaction_on_etherscan
Device sessions

5. test_long_press_to_delete_1_1_chat
Device sessions

6. test_password_in_logcat_sign_in
Device sessions

7. test_text_message_1_1_chat
Device sessions

8. test_add_to_contacts
Device sessions

9. test_sign_typed_message (TestRail link is not found)
Device sessions

10. test_unread_messages_counter_1_1_chat
Device sessions

11. test_send_message_in_group_chat
Device sessions

12. test_manage_assets
Device sessions

13. test_long_press_to_delete_public_chat
Device sessions

14. test_send_emoji
Device sessions

15. test_search_chat_on_home
Device sessions

16. test_logcat_recovering_account
Device sessions

17. test_messaging_in_different_networks
Device sessions

18. test_logcat_sign_message_from_daap
Device sessions

19. test_switch_users_and_add_new_account
Device sessions

20. test_login_with_new_account
Device sessions

21. test_add_contact_from_public_chat
Device sessions

22. test_password_in_logcat_creating_account
Device sessions

23. test_backup_recovery_phrase
Device sessions

24. test_offline_status
Device sessions

25. test_open_google_com_via_open_dapp
Device sessions

26. test_unread_messages_counter_public_chat
Device sessions

27. test_sign_message_from_daap
Device sessions

28. test_user_can_remove_profile_picture
Device sessions

29. test_share_contact_code_and_wallet_address
Device sessions

30. test_request_eth_in_wallet
Device sessions

31. test_refresh_button_browsing_app_webview
Device sessions

32. test_backup_recovery_phrase_warning_from_wallet
Device sessions

@statustestbot
Copy link

98% of end-end tests have passed

Total executed tests: 47
Failed tests: 1
Passed tests: 46

Failed tests (1)

Click to expand
1. test_block_user_from_public_chat

Device 1: Tap on SignInButton
Device 1: Tap on PlusButton

Device 1: 'JoinPublicChatButton' is not found on the screen

Device sessions

Passed tests (46)

Click to expand
1. test_filters_from_daap
Device sessions

2. test_copy_and_paste_messages
Device sessions

3. test_send_transaction_from_daap
Device sessions

4. test_request_and_receive_tokens_in_1_1_chat
Device sessions

5. test_deploy_contract_from_daap
Device sessions

6. test_open_transaction_on_etherscan
Device sessions

7. test_public_chat_messaging
Device sessions

8. test_long_press_to_delete_1_1_chat
Device sessions

9. test_password_in_logcat_sign_in
Device sessions

10. test_text_message_1_1_chat
Device sessions

11. test_add_to_contacts
Device sessions

12. test_sign_typed_message (TestRail link is not found)
Device sessions

13. test_unread_messages_counter_1_1_chat
Device sessions

14. test_logcat_send_transaction_from_daap
Device sessions

15. test_send_message_in_group_chat
Device sessions

16. test_logcat_send_transaction_from_wallet
Device sessions

17. test_send_token_with_7_decimals
Device sessions

18. test_send_eth_from_wallet_to_address
Device sessions

19. test_manage_assets
Device sessions

20. test_logcat_send_transaction_in_1_1_chat
Device sessions

21. test_request_and_receive_eth_in_1_1_chat
Device sessions

22. test_long_press_to_delete_public_chat
Device sessions

23. test_send_emoji
Device sessions

24. test_search_chat_on_home
Device sessions

25. test_logcat_recovering_account
Device sessions

26. test_messaging_in_different_networks
Device sessions

27. test_send_tokens_in_1_1_chat
Device sessions

28. test_network_mismatch_for_send_request_commands
Device sessions

29. test_logcat_sign_message_from_daap
Device sessions

30. test_switch_users_and_add_new_account
Device sessions

31. test_send_stt_from_wallet
Device sessions

32. test_login_with_new_account
Device sessions

33. test_send_eth_from_wallet_to_contact
Device sessions

34. test_add_contact_from_public_chat
Device sessions

35. test_send_two_transactions_one_after_another_in_dapp
Device sessions

36. test_password_in_logcat_creating_account
Device sessions

37. test_backup_recovery_phrase
Device sessions

38. test_offline_status
Device sessions

39. test_open_google_com_via_open_dapp
Device sessions

40. test_unread_messages_counter_public_chat
Device sessions

41. test_sign_message_from_daap
Device sessions

42. test_user_can_remove_profile_picture
Device sessions

43. test_share_contact_code_and_wallet_address
Device sessions

44. test_request_eth_in_wallet
Device sessions

45. test_refresh_button_browsing_app_webview
Device sessions

46. test_backup_recovery_phrase_warning_from_wallet
Device sessions

@statustestbot
Copy link

100% of end-end tests have passed

Total executed tests: 1
Failed tests: 0
Passed tests: 1

Passed tests (1)

Click to expand
1. test_block_user_from_public_chat
Device sessions

@rasom rasom merged commit 908f730 into develop Jun 13, 2019
@delete-merged-branch delete-merged-branch bot deleted the network-module branch June 13, 2019 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

7 participants