Commit cd762f18 authored by Mario Hock's avatar Mario Hock

--smooth-net

parent 5a9da248
...@@ -82,13 +82,14 @@ def plot_net(ax, cnl_file, args): ...@@ -82,13 +82,14 @@ def plot_net(ax, cnl_file, args):
# parameters # parameters
legend_outside = True legend_outside = True
alpha = args.opacity if args.transparent_net else 1.0 alpha = args.opacity if args.transparent_net else 1.0
#smooth = args.smooth_net smooth = args.smooth_net
# axes # axes
ax.set_ylim(0,10**10) ax.set_ylim(0,10**10)
ax.set_ylabel('Throughput (Bit/s)') ax.set_ylabel('Throughput (Bit/s)')
plot(ax, cnl_file.x_values, cnl_file.cols, cnl_file.net_col_names, alpha) plot(ax, cnl_file.x_values, cnl_file.cols, cnl_file.net_col_names, alpha,
ema_only=True if smooth else False, smooth=smooth)
# Legend # Legend
if ( legend_outside ): if ( legend_outside ):
...@@ -174,6 +175,12 @@ if __name__ == "__main__": ...@@ -174,6 +175,12 @@ if __name__ == "__main__":
metavar="ALPHA", metavar="ALPHA",
help = "Smooth CPU values with exponential moving average. (Disabled by default. When specified without parameter: ALPHA=0.1)" ) help = "Smooth CPU values with exponential moving average. (Disabled by default. When specified without parameter: ALPHA=0.1)" )
## XXX experimental..
parser.add_argument("-sn", "--smooth-net", nargs='?', const=DEFAULT_ALPHA, type=float,
metavar="ALPHA",
help = "Smooth transmission rates with exponential moving average. (Disabled by default. When specified without parameter: ALPHA=0.1)" )
# TODO make mutual exclusive # TODO make mutual exclusive
parser.add_argument("-sr", "--send-receive", action="store_true", parser.add_argument("-sr", "--send-receive", action="store_true",
help="Plots only outgoing data from the first file, and only incoming data from the second file. (If there's only one file, then the outgoing data is plotted.)") help="Plots only outgoing data from the first file, and only incoming data from the second file. (If there's only one file, then the outgoing data is plotted.)")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment