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

Explore test/code coverage to identify test improvements #144

Open
rmccorm4 opened this issue Feb 10, 2025 · 1 comment
Open

Explore test/code coverage to identify test improvements #144

rmccorm4 opened this issue Feb 10, 2025 · 1 comment
Assignees
Labels
good first issue Good for newcomers

Comments

@rmccorm4
Copy link
Contributor

rmccorm4 commented Feb 10, 2025

To automate identifying which modules and objects are missing testing, we can try some tools like tarpaulin or cargo-llvm-cov

Doesn't necessarily have to be added in automation or enforce any minimum code coverage requirements - but can at least help identify areas for test improvement short term.

Depending on how heavy it is, we can add it to rust pre merge action or a nighty job.

@rmccorm4 rmccorm4 added the good first issue Good for newcomers label Feb 10, 2025
@tanmayv25 tanmayv25 self-assigned this Feb 10, 2025
@tanmayv25
Copy link
Contributor

Following is the code coverage of rust runtime as of 2/11/25:

Filename                                      Regions    Missed Regions     Cover   Functions  Missed Functions  Executed       Lines      Missed Lines     Cover    Branches   Missed Branches     Cover
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
component.rs                                       32                32     0.00%          24                24     0.00%          74                74     0.00%           0                 0         -
component/client.rs                                86                86     0.00%          17                17     0.00%         149               149     0.00%           0                 0         -
component/endpoint.rs                              43                43     0.00%           9                 9     0.00%          70                70     0.00%           0                 0         -
component/registry.rs                               2                 2     0.00%           2                 2     0.00%           8                 8     0.00%           0                 0         -
component/service.rs                               34                34     0.00%           8                 8     0.00%          45                45     0.00%           0                 0         -
config.rs                                          29                18    37.93%          10                 5    50.00%          55                24    56.36%           0                 0         -
discovery.rs                                        5                 5     0.00%           4                 4     0.00%          13                13     0.00%           0                 0         -
distributed.rs                                     53                53     0.00%          19                19     0.00%          88                88     0.00%           0                 0         -
engine.rs                                           7                 3    57.14%           7                 3    57.14%          29                14    51.72%           0                 0         -
pipeline.rs                                         3                 2    33.33%           3                 2    33.33%           9                 6    33.33%           0                 0         -
pipeline/context.rs                                85                34    60.00%          62                27    56.45%         261                89    65.90%           0                 0         -
pipeline/error.rs                                   5                 4    20.00%           2                 1    50.00%           8                 5    37.50%           0                 0         -
pipeline/network.rs                                47                32    31.91%          18                12    33.33%          70                47    32.86%           0                 0         -
pipeline/network/codec/two_part.rs                159                27    83.02%          38                 4    89.47%         721                31    95.70%           0                 0         -
pipeline/network/egress/push.rs                    33                33     0.00%           7                 7     0.00%          89                89     0.00%           0                 0         -
pipeline/network/ingress/push_endpoint.rs          35                35     0.00%           5                 5     0.00%          33                33     0.00%           0                 0         -
pipeline/network/ingress/push_handler.rs           59                59     0.00%           3                 3     0.00%          61                61     0.00%           0                 0         -
pipeline/network/tcp.rs                            27                 2    92.59%           5                 1    80.00%         174                 5    97.13%           0                 0         -
pipeline/network/tcp/client.rs                     71                35    50.70%          11                 5    54.55%         126                46    63.49%           0                 0         -
pipeline/network/tcp/server.rs                    203                95    53.20%          33                13    60.61%         323               119    63.16%           0                 0         -
pipeline/nodes.rs                                  61                15    75.41%          29                 6    79.31%         100                15    85.00%           0                 0         -
pipeline/nodes/sinks/base.rs                       13                 3    76.92%           5                 1    80.00%          20                 1    95.00%           0                 0         -
pipeline/nodes/sinks/pipeline.rs                   13                 1    92.31%           6                 0   100.00%          18                 0   100.00%           0                 0         -
pipeline/nodes/sinks/segment.rs                    19                 3    84.21%           9                 1    88.89%          32                 1    96.88%           0                 0         -
pipeline/nodes/sources/base.rs                     50                13    74.00%          15                 5    66.67%         105                11    89.52%           0                 0         -
pipeline/nodes/sources/common.rs                   24                 6    75.00%          10                 2    80.00%          49                 6    87.76%           0                 0         -
pipeline/registry.rs                               38                 6    84.21%          16                 4    75.00%          95                20    78.95%           0                 0         -
protocols.rs                                        1                 1     0.00%           1                 1     0.00%           3                 3     0.00%           0                 0         -
protocols/annotated.rs                             37                37     0.00%          14                14     0.00%          87                87     0.00%           0                 0         -
runtime.rs                                         36                25    30.56%          12                 7    41.67%          56                28    50.00%           0                 0         -
service.rs                                         32                25    21.88%          12                 8    33.33%         102                46    54.90%           0                 0         -
transports/etcd.rs                                 93                93     0.00%          27                27     0.00%         158               158     0.00%           0                 0         -
transports/etcd/lease.rs                           60                60     0.00%           6                 6     0.00%          69                69     0.00%           0                 0         -
transports/nats.rs                                112                78    30.36%          26                18    30.77%         152                79    48.03%           0                 0         -
transports/nats/slug.rs                            33                33     0.00%          15                15     0.00%          73                73     0.00%           0                 0         -
worker.rs                                          86                34    60.47%          15                 6    60.00%         114                33    71.05%           0                 0         -
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                            1726              1067    38.18%         505               292    42.18%        3639              1646    54.77%           0                 0         -

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants