MCPcopy Create free account
hub / github.com/apache/pig / print

Method print

src/org/apache/pig/tools/timer/PerformanceTimer.java:55–73  ·  view source on GitHub ↗

Dump the total time, total number of starts and stops, and average run time of the timer to an output stream. @param out output stream to write info to.

(PrintStream out)

Source from the content-addressed store, hash-verified

53 * @param out output stream to write info to.
54 */
55public void print(PrintStream out)
56{
57 if (mStarts == 0) {
58 out.println(mName + " never started.");
59 return;
60 }
61
62 if (mState == State.RUNNING) out.print("WARNING: timer still running! ");
63 out.print(mName + ": ");
64 double t = mNanosecs / 1000000000.0;
65 out.print(t);
66 out.print(". Run ");
67 out.print(mStarts);
68 out.print(" times, average run time ");
69 long avg = mNanosecs / mStarts;
70 t = avg / 1000000000.0;
71 out.print(t);
72 out.println(".");
73}
74
75/**
76 * @param name Name of this timer.

Callers 15

testMultiStorageMethod · 0.45
execMethod · 0.45
TestLexerMethod · 0.45
test2Method · 0.45
writeToFileMethod · 0.45
createInputFileMethod · 0.45
validateFailureMethod · 0.45
validateDryrunFailureMethod · 0.45
verifyOrderByMethod · 0.45
verifySkewJoinMethod · 0.45

Calls

no outgoing calls

Tested by 15

testMultiStorageMethod · 0.36
TestLexerMethod · 0.36
test2Method · 0.36
writeToFileMethod · 0.36
createInputFileMethod · 0.36
validateFailureMethod · 0.36
validateDryrunFailureMethod · 0.36
verifyOrderByMethod · 0.36
verifySkewJoinMethod · 0.36
goLocalMethod · 0.36