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
Modifier and TypeClassDescriptionclass
container class for profile information -
Method Summary
Modifier and TypeMethodDescriptionstatic MetacatProfiler
get a singleton instancereturn a hashtable of the profilesvoid
print the CSV file with no sortingvoid
printLogMsg
(String msg) print a message to the log in real-timevoid
printSortedCSV
(File f, String sortKey) print a sorted CSV file.void
reset()
reset all times in the singletonsortProfiles
(String sortKey) sort the profiles by "callorder", "callcount" or "total"void
start the timing on a profilevoid
stop 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
-