NetSys / bess

BESS: Berkeley Extensible Software Switch
Other
311 stars 174 forks source link

Fix missing column header in 'monitor tc' csv output #1010

Closed levaitamas closed 4 years ago

levaitamas commented 4 years ago

I have just started to use the CSV output of monitor tc. That is a really cool feature, thanks! Unfortunately, the headers are skewed due to a missing TC column header. The PR fixes this issue.


Demo:

$ CSV=/tmp/bess.csv ./bessctl run samples/update -- monitor tc

Before: csv file

Timestamp,CPU MHz,scheduled,Mpps,Mbps,pkts/sched,cycles/p
08:50:57,W0 !leaf_source0:0,2400.050,2491609.000,79.732,53579.580,32.000,30.102
08:50:58,W0 !leaf_source0:0,2400.048,2490410.000,79.693,53553.796,32.000,30.116

as org table

| Timestamp | CPU MHz            | scheduled |        Mpps |   Mbps | pkts/sched | cycles/p |        |
|  08:50:57 | W0 !leaf_source0:0 |  2400.050 | 2491609.000 | 79.732 |  53579.580 |   32.000 | 30.102 |
|  08:50:58 | W0 !leaf_source0:0 |  2400.048 | 2490410.000 | 79.693 |  53553.796 |   32.000 | 30.116 |

After:

Timestamp,traffic class,CPU MHz,scheduled,Mpps,Mbps,pkts/sched,cycles/p
08:51:41,W0 !leaf_source0:0,2400.064,2491320.000,79.722,53573.349,32.000,30.105
08:51:42,W0 !leaf_source0:0,2400.049,2493994.000,79.808,53630.849,32.000,30.073
| Timestamp | traffic class      |  CPU MHz |   scheduled |   Mpps |      Mbps | pkts/sched | cycles/p |
|  08:51:41 | W0 !leaf_source0:0 | 2400.064 | 2491320.000 | 79.722 | 53573.349 |     32.000 |   30.105 |
|  08:51:42 | W0 !leaf_source0:0 | 2400.049 | 2493994.000 | 79.808 | 53630.849 |     32.000 |   30.073 |
codecov[bot] commented 4 years ago

Codecov Report

Merging #1010 into master will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1010   +/-   ##
=======================================
  Coverage   55.96%   55.96%           
=======================================
  Files           9        9           
  Lines        1165     1165           
=======================================
  Hits          652      652           
  Misses        513      513           

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update c5bba2f...0a5b574. Read the comment docs.