Skip to content

Commit

Permalink
add total interruptible functions
Browse files Browse the repository at this point in the history
  • Loading branch information
Vadim Sadokhov committed Nov 2, 2024
1 parent 99020d3 commit 112af4a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions compiler/stats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ void Stats::on_function_processed(FunctionPtr function) {
if (function->is_resumable) {
++total_resumable_functions_;
}
if (function->is_interruptible) {
++total_interruptible_functions_;
}
if (function->is_inline) {
++total_inline_functions_;
}
Expand Down Expand Up @@ -78,6 +81,7 @@ void Stats::write_to(std::ostream &out, bool with_indent) const {
out << indent << "functions.total_inline: " << total_inline_functions_ << std::endl;
out << indent << "functions.total_throwing: " << total_throwing_functions_ << std::endl;
out << indent << "functions.total_resumable: " << total_resumable_functions_ << std::endl;
out << indent << "functions.total_interruptible: " << total_interruptible_functions_ << std::endl;
out << block_sep;
out << indent << "memory.rss: " << memory_rss_ * 1024 << std::endl;
out << indent << "memory.rss_peak: " << memory_rss_peak_ * 1024 << std::endl;
Expand Down
1 change: 1 addition & 0 deletions compiler/stats.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ class Stats {
std::atomic<std::uint64_t> total_functions_{0u};
std::atomic<std::uint64_t> total_throwing_functions_{0u};
std::atomic<std::uint64_t> total_resumable_functions_{0u};
std::atomic<std::uint64_t> total_interruptible_functions_{0u};
std::atomic<std::uint64_t> total_inline_functions_{0u};

std::atomic<std::uint64_t> memory_rss_{0};
Expand Down

0 comments on commit 112af4a

Please sign in to comment.