Commit 67c26a91 authored by Peter Pentchev's avatar Peter Pentchev

Microoptimize by dropping a needless sort.

parent b7ddb571
......@@ -7,6 +7,7 @@ Change log for ethstats, the network traffic statistics utility
- do not make all the warnings fatal, this is bad for
- use autovivification instead of an unwiedly defined-or
- drop a needless sorting while fetching the interface stats
1.1.0 2015/12/11
- use Getopt::Std for command-line option processing
......@@ -148,7 +148,7 @@ sub convert($)
delete $devs{lo};
foreach my $dev (sort { $a->{name} cmp $b->{name} } values %devs) {
foreach my $dev (values %devs) {
$prevstat{$dev->{name}} //= { name => $dev->{name} };
update_traffic $dev->{data}, $prevstat{$dev->{name}}, $period;
$dev->{data}->{kb} = {
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