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

Packet queues implementation #155

Merged
merged 19 commits into from
Dec 28, 2021
Merged

Conversation

mdabrowski1990
Copy link
Owner

Description

Implementation for (FIFO and timed one) queues are added.

How Has This Been Tested?

Unit tests and integration tests.

Process

I know the process and did my best to follow it

mdabrowski1990 and others added 13 commits December 20, 2021 16:03
Provide basic methods and define properties in the Queue class.
save current progress
A little code added
Update the code for Async Queue attribute.
Mastering asyncio and getting familiar with asynchronous code.
Seems like I am getting closer to TimestampedQueue implementation.
Seems like FIFO Queue is ready.
Queues API was updated a bit.
1) TimeStamp variable removed
datetime and perf_coutner used instead
2) TimestampedPacketsQueue uses perf_counter instead of datetimte (it is more accurate)
3) algorithm for TimestampedPacketsQueue defined
Timestamped queue is created.
The performance has to be improved, but I suppose selecting a probper loop would make the trick.
Fix issues found by Static Code Analysis.
Get rid of performance checking for async code.
@mdabrowski1990 mdabrowski1990 added the implementation Changes to code label Dec 28, 2021
@mdabrowski1990 mdabrowski1990 self-assigned this Dec 28, 2021
@mdabrowski1990 mdabrowski1990 added this to In progress in UDS via automation Dec 28, 2021
@mdabrowski1990 mdabrowski1990 linked an issue Dec 28, 2021 that may be closed by this pull request
@codecov-commenter
Copy link

codecov-commenter commented Dec 28, 2021

Codecov Report

Merging #155 (a9213a5) into main (d582052) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##              main      #155   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           34        34           
  Lines         1893      1952   +59     
=========================================
+ Hits          1893      1952   +59     
Flag Coverage Δ
integration-tests 89.03% <43.29%> (-1.93%) ⬇️
unit-tests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
uds/utilities/__init__.py 100.00% <ø> (ø)
uds/utilities/common_types.py 100.00% <ø> (ø)
uds/message/uds_message.py 100.00% <100.00%> (ø)
uds/packet/__init__.py 100.00% <100.00%> (ø)
uds/packet/abstract_packet.py 100.00% <100.00%> (ø)
uds/packet/can_packet.py 100.00% <100.00%> (ø)
uds/packet/can_packet_record.py 100.00% <100.00%> (ø)
uds/transport_interface/abstract_packet_queue.py 100.00% <100.00%> (ø)
uds/transport_interface/packet_queues.py 100.00% <100.00%> (ø)

Remove code that counted unfinished tasks for the second time (duplicate to iunternal Queue implementation).
Copy link
Owner Author

@mdabrowski1990 mdabrowski1990 left a comment

Choose a reason for hiding this comment

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

There are a few things to fix.

Fix remarks found during self-review.
Copy link
Owner Author

@mdabrowski1990 mdabrowski1990 left a comment

Choose a reason for hiding this comment

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

Seems ok

Update workflow to exclude performance tests in unit testing.
@mdabrowski1990 mdabrowski1990 merged commit 7634ddd into main Dec 28, 2021
UDS automation moved this from In progress to Done Dec 28, 2021
@mdabrowski1990 mdabrowski1990 deleted the packet_queues_implementation branch December 28, 2021 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
implementation Changes to code
Projects
No open projects
UDS
  
Done
Development

Successfully merging this pull request may close these issues.

Implement Packet Queue
2 participants