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

refactor: Structural output list network profiles #1915

Merged
merged 2 commits into from
May 12, 2021

Conversation

piotradamczyk5
Copy link
Contributor

@piotradamczyk5 piotradamczyk5 commented May 11, 2021

Fixes #1864

Test Plan

How do we know the code works?

Checklist

  • Refactored

@github-actions
Copy link
Contributor

github-actions bot commented May 11, 2021

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@github-actions
Copy link
Contributor

github-actions bot commented May 11, 2021

Timestamp: 2021-05-12 17:30:04
Buildscan url for ubuntu-workflow run 836307458
https://gradle.com/s/k33opzk33ufds

@piotradamczyk5 piotradamczyk5 self-assigned this May 11, 2021
@bootstraponline bootstraponline force-pushed the 1872_refactor_structural_output_network_profiles branch from f46abc8 to 1093fbd Compare May 11, 2021 17:29
Copy link
Contributor

@adamfilipow92 adamfilipow92 left a comment

Choose a reason for hiding this comment

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

  • Code looks good
  • Output works like before
fetching available network profiles...
┌────────────┬──────┬────────┬────────────┬───────────────────┬───────────┬───────┐
│ PROFILE_ID │ RULE │ DELAY  │ LOSS_RATIO │ DUPLICATION_RATIO │ BANDWIDTH │ BURST │
├────────────┼──────┼────────┼────────────┼───────────────────┼───────────┼───────┤
│            │ up   │ 0.040s │   0.001    │                   │  16000.0  │       │
│ LTE        │ down │ 0.040s │   0.001    │                   │  16000.0  │       │
├────────────┼──────┼────────┼────────────┼───────────────────┼───────────┼───────┤
│            │ up   │ 0.060s │   0.0015   │                   │  4000.0   │       │
│ LTE-poor   │ down │ 0.060s │   0.0015   │                   │  4000.0   │       │
├────────────┼──────┼────────┼────────────┼───────────────────┼───────────┼───────┤
│            │ up   │ 0.060s │   0.001    │                   │  2000.0   │       │
│ HSPA       │ down │ 0.060s │   0.001    │                   │  4000.0   │       │
├────────────┼──────┼────────┼────────────┼───────────────────┼───────────┼───────┤
│            │ up   │ 0.100s │   0.0015   │                   │   500.0   │       │
│ HSPA-poor  │ down │ 0.100s │   0.0015   │                   │  1000.0   │       │
├────────────┼──────┼────────┼────────────┼───────────────────┼───────────┼───────┤
│            │ up   │ 0.060s │    0.02    │                   │  2000.0   │       │
│ UMTS       │ down │ 0.060s │    0.02    │                   │  2000.0   │       │
├────────────┼──────┼────────┼────────────┼───────────────────┼───────────┼───────┤
│            │ up   │ 0.090s │    0.04    │                   │   384.0   │       │
│ UMTS-poor  │ down │ 0.090s │    0.04    │                   │   384.0   │       │
├────────────┼──────┼────────┼────────────┼───────────────────┼───────────┼───────┤
│            │ up   │ 0.150s │    0.04    │                   │   384.0   │       │
│ EDGE       │ down │ 0.150s │    0.04    │                   │   384.0   │       │
├────────────┼──────┼────────┼────────────┼───────────────────┼───────────┼───────┤
│            │ up   │ 0.200s │    0.08    │                   │   96.0    │       │
│ EDGE-poor  │ down │ 0.200s │    0.08    │                   │   96.0    │       │
├────────────┼──────┼────────┼────────────┼───────────────────┼───────────┼───────┤
│            │ up   │ 0.300s │    0.08    │                   │   172.0   │       │
│ GPRS       │ down │ 0.300s │    0.08    │                   │   172.0   │       │
├────────────┼──────┼────────┼────────────┼───────────────────┼───────────┼───────┤
│            │ up   │ 0.500s │    0.1     │                   │   48.0    │       │
│ GPRS-poor  │ down │ 0.500s │    0.1     │                   │   48.0    │       │
├────────────┼──────┼────────┼────────────┼───────────────────┼───────────┼───────┤
│            │ up   │ 0.500s │    0.08    │                   │    9.6    │       │
│ GSM        │ down │ 0.500s │    0.08    │                   │    9.6    │       │
├────────────┼──────┼────────┼────────────┼───────────────────┼───────────┼───────┤
│            │ up   │ 0.600s │    0.1     │                   │    2.4    │       │
│ GSM-poor   │ down │ 0.600s │    0.1     │                   │    2.4    │       │
└────────────┴──────┴────────┴────────────┴───────────────────┴───────────┴───────┘

Total run duration: 0m  2s

@bootstraponline bootstraponline force-pushed the 1872_refactor_structural_output_network_profiles branch from 1093fbd to 017e7c9 Compare May 11, 2021 17:46

@Suppress("UNCHECKED_CAST")
when {
(this as? List<NetworkProfile>) != null -> this.toCliTable()
Copy link
Contributor

Choose a reason for hiding this comment

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

Just wondering, maybe we could introduce a wrapper for the list? We could avoid casting and annotation.
True -- it touches more places in code.
Let me know what do you think

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah we could do it, I will add it to this PR and adjust other places

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@piotradamczyk5 piotradamczyk5 force-pushed the 1872_refactor_structural_output_network_profiles branch from 017e7c9 to 815621a Compare May 12, 2021 17:24
@piotradamczyk5 piotradamczyk5 force-pushed the 1872_refactor_structural_output_network_profiles branch from 815621a to 942c9a9 Compare May 12, 2021 17:24
@mergify mergify bot merged commit 8f745b7 into master May 12, 2021
@mergify mergify bot deleted the 1872_refactor_structural_output_network_profiles branch May 12, 2021 18:35
@github-actions github-actions bot locked and limited conversation to collaborators May 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Structural output - ListNetworkProfiles
3 participants