Package edu.ucsb.nceas.metacat
Class MetacatProfiler
java.lang.Object
edu.ucsb.nceas.metacat.MetacatProfiler
- Author:
- berkley Singleton to track metacat profile stats and print them to a CSV file
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclasscontainer class for profile information -
Method Summary
Modifier and TypeMethodDescriptionstatic MetacatProfilerget a singleton instancereturn a hashtable of the profilesvoidprint the CSV file with no sortingvoidprintLogMsg(String msg) print a message to the log in real-timevoidprintSortedCSV(File f, String sortKey) print a sorted CSV file.voidreset()reset all times in the singletonsortProfiles(String sortKey) sort the profiles by "callorder", "callcount" or "total"voidstart the timing on a profilevoidstop the timing on a profile
-
Method Details
-
getInstance
get a singleton instance- Returns:
-
getProfiles
return a hashtable of the profiles- Returns:
-
reset
public void reset()reset all times in the singleton -
printLogMsg
print a message to the log in real-time- Parameters:
msg-
-
startTime
start the timing on a profile- Parameters:
profileName-
-
stopTime
stop the timing on a profile- Parameters:
profileName-
-
sortProfiles
sort the profiles by "callorder", "callcount" or "total"- Parameters:
sortKey-- Returns:
-
printSortedCSV
print a sorted CSV file. The sortKey can be "callorder", "callcount" or "total"- Parameters:
f-sortKey-- Throws:
IOException
-
printCSV
print the CSV file with no sorting- Parameters:
f-- Throws:
IOException
-