Skip to content

Commit

Permalink
Add units to ram benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
Linus Wagner committed Mar 4, 2024
1 parent 8d6e1d3 commit a646235
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/org/rascalmpl/library/util/Benchmark.rsc
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,16 @@ The number can change over time but it's never higher than ((getMaxMemory))`
java int getTotalMemory();

@synopsis{Returns the maximum amount of memory that is available to the current JVM}
@description{Amount returned in bytes.}
@javaClass{org.rascalmpl.library.util.Benchmark}
java int getMaxMemory();

@synopsis{Returns the amount of memory that is currently in use by the programs running on this JVM}
@description{Amount returned in bytes.}
int getUsedMemory() = getTotalMemory() - getFreeMemory();

@synopsis{Returns the amount of memory that is yet available, in principle, on the current JVM}
@description{Amount returned in bytes.}
int getMaxFreeMemory() = getMaxMemory() - getUsedMemory();

@synopsis{CPU time in nanoseconds (10^-9^ sec)}
Expand Down

0 comments on commit a646235

Please sign in to comment.