-
Notifications
You must be signed in to change notification settings - Fork 119
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
refactor: Structural output list network profiles #1915
Conversation
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
Timestamp: 2021-05-12 17:30:04 |
f46abc8
to
1093fbd
Compare
There was a problem hiding this 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
1093fbd
to
017e7c9
Compare
|
||
@Suppress("UNCHECKED_CAST") | ||
when { | ||
(this as? List<NetworkProfile>) != null -> this.toCliTable() |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pawelpasterz fixed
017e7c9
to
815621a
Compare
815621a
to
942c9a9
Compare
Fixes #1864
Test Plan
flank firebase test network-profiles list
works like beforeChecklist