Skip to content

Commit

Permalink
Fixed statistics_csv
Browse files Browse the repository at this point in the history
  • Loading branch information
maxsharabayko committed Jul 12, 2024
1 parent e248822 commit 2cbd43d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion xtransmit/tcp_socket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -405,9 +405,13 @@ string tcp_info_to_csv(int socketid, const tcp_info& stats, bool print_header)
}
#endif

const string socket::tcp::statistics_csv(bool print_header) const
const string socket::tcp::get_statistics(std::string stats_format, bool print_header) const
{
#ifdef ENABLE_TCP_STATS
if (stats_format != "csv")
spdlog::warn("TCP {} format is not supported. 'csv' format will be used instead.", stats_format);


tcp_info tcp_stats = {};
socklen_t len = sizeof tcp_stats;

Expand Down
2 changes: 1 addition & 1 deletion xtransmit/tcp_socket.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class tcp
#endif
}

const std::string statistics_csv(bool print_header) const final;
const std::string get_statistics(std::string stats_format, bool print_header) const final;

private:
void raise_exception(const string&& place, const string&& reason) const;
Expand Down

0 comments on commit 2cbd43d

Please sign in to comment.