Skip to content

Commit

Permalink
Explain how to disable built-in metrics in the README
Browse files Browse the repository at this point in the history
  • Loading branch information
ajsquared committed Jan 26, 2015
1 parent b5fbaf5 commit 06fbb01
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ Memory and GC metrics are reported once every 10 seconds. The CPU time is sampl

Profiling a long-running process or a lot of processes simultaneously will produce a lot of data, so be careful with the capacity of your StatsD instance. The `packageWhitelist` and `packageBlacklist` arguments can be used to limit the number of functions that are reported. Any function whose stack trace contains a function in one of the whitelisted packages will be included.

You can disable either the memory or CPU metrics using the `profilers` argument:

1. Memory metrics only: `profilers=MemoryProfiler`
2. CPU metrics only: `profilers=CPUProfiler`

## Visualization

The `visualization` directory contains some utilities for visualizing the output of the profiler.
4 changes: 4 additions & 0 deletions src/main/java/com/etsy/statsd/profiler/Arguments.java
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ private Set<Class<? extends Profiler>> parseProfilerArg(String profilerArg) {
}
}

if (profilers.isEmpty()) {
throw new IllegalArgumentException("At least one profiler must be run");
}

return profilers;
}
}

0 comments on commit 06fbb01

Please sign in to comment.