Skip to content

Commit

Permalink
all: add additional Javadoc to avoid nag
Browse files Browse the repository at this point in the history
  • Loading branch information
carl-mastrangelo committed May 24, 2021
1 parent 9b38788 commit e248396
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 1 deletion.
9 changes: 8 additions & 1 deletion api/src/main/java/io/perfmark/PerfMark.java
Expand Up @@ -170,6 +170,7 @@ public static void startTask(String taskName) {
*
* @param taskNameObject the name of the task.
* @param taskNameFunction the function that will convert the taskNameObject to a taskName
* @param <T> the object type to be stringified
* @since 0.22.0
*/
public static <T> void startTask(T taskNameObject, StringFunction<? super T> taskNameFunction) {
Expand Down Expand Up @@ -197,10 +198,12 @@ public static void startTask(String taskName, String subTaskName) {
*
* <p>The returned closeable is meant to be used in a try-with-resources block. Callers should not
* allow the returned closeable to be used outside of the try block that initiated the call.
* Unlike other closeables, it is not safe to call close() more than once.
*
* <p>This method is <strong>NOT API STABLE</strong>.
*
* @param taskName the name of the task.
* @return a closeable that must be closed at the end of the task
* @since 0.23.0
*/
@MustBeClosed
Expand All @@ -216,12 +219,15 @@ public static TaskCloseable traceTask(String taskName) {
*
* <p>This function has many more caveats than the {@link #traceTask(String)} that accept a
* string. See the docs at {@link #attachTag(String, Object, StringFunction)} for a list of risks
* associated with passing a function.
* associated with passing a function. Unlike other closeables, it is not safe to call close()
* more than once.
*
* <p>This method is <strong>NOT API STABLE</strong>.
*
* @param taskNameObject the name of the task.
* @param taskNameFunction the function that will convert the taskNameObject to a taskName
* @param <T> the object type to be stringified
* @return a closeable that must be closed at the end of the task
* @since 0.23.0
*/
@MustBeClosed
Expand Down Expand Up @@ -571,6 +577,7 @@ public static void attachTag(String tagName, long tagValue0, long tagValue1) {
* @param tagName The name of the value being attached
* @param tagObject The tag object which will passed to the stringFunction.
* @param stringFunction The function that will convert the object to
* @param <T> the type of tag object to be stringified
* @since 0.22.0
*/
public static <T> void attachTag(
Expand Down
4 changes: 4 additions & 0 deletions impl/src/main/java/io/perfmark/impl/MarkHolderProvider.java
Expand Up @@ -22,6 +22,8 @@ protected MarkHolderProvider() {}

/**
* To be removed in 0.26.0
*
* @return the new MarkHolder for the current thread.
*/
@Deprecated
public MarkHolder create() {
Expand All @@ -34,6 +36,8 @@ public MarkHolder create() {
*
* @param markHolderId the Unique ID associated with the Mark Holder. This exists as a work around to Java's
* thread ID, which does not guarantee they will not be reused.
* @return the new MarkHolder for the current thread.
* @since 0.24.0
*/
public MarkHolder create(long markHolderId) {
return create();
Expand Down
Expand Up @@ -14,6 +14,10 @@
* limitations under the License.
*/

/**
* The Trace View package reads the PerfMark recorded tasks, and converts them into the
* Chrome Trace Viewer format, bundled into a self-contained HTML page.
*/
@javax.annotation.CheckReturnValue
@javax.annotation.ParametersAreNonnullByDefault
package io.perfmark.traceviewer;
Expand Up @@ -14,6 +14,10 @@
* limitations under the License.
*/

/**
* The Trace Writer package reads the PerfMark recorded tasks, and converts them into the
* Chrome Trace Viewer format.
*/
@javax.annotation.CheckReturnValue
@javax.annotation.ParametersAreNonnullByDefault
package io.perfmark.tracewriter;

0 comments on commit e248396

Please sign in to comment.