Skip to content

Commit

Permalink
Update documentation for Actor and Scheduler statistics (#4406)
Browse files Browse the repository at this point in the history
Prior to this change, it wasn't clear without looking at the code
that you need a runtime compiled to support runtime statistics
otherwise all actor and scheduler stats will be 0.
  • Loading branch information
SeanTAllen authored Aug 22, 2023
1 parent 50615a6 commit 4f2936a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion packages/runtime_info/actor_stats.pony
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ use @pony_actor_stats[_ActorStats]()

primitive ActorStats
"""
Provides functions that expose statistics about the current actor.
Provides functions that expose statistics about the current actor. All
methods will return '0' if the runtime used the program wasn't compiled with
runtime statistics turned on.
"""

fun heap_mem_allocated(auth: ActorStatsAuth): USize =>
Expand Down
4 changes: 3 additions & 1 deletion packages/runtime_info/scheduler_stats.pony
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ use @pony_scheduler_stats[_SchedulerStats]()

primitive SchedulerStats
"""
Provides functions that expose statistics about the current scheduler.
Provides functions that expose statistics about the current scheduler. All
methods will return '0' if the runtime used the program wasn't compiled with
runtime statistics turned on.
"""

fun total_mem_allocated(auth: SchedulerStatsAuth): I64 =>
Expand Down

0 comments on commit 4f2936a

Please sign in to comment.