Joshua
open source statistical hierarchical phrase-based machine translation system
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends
src/kenlm/util/usage.hh
00001 #ifndef UTIL_USAGE_H
00002 #define UTIL_USAGE_H
00003 #include <cstddef>
00004 #include <iosfwd>
00005 #include <string>
00006 #include <stdint.h>
00007 
00008 namespace util {
00009 // Time in seconds since process started.  Zero on unsupported platforms.
00010 double WallTime();
00011 
00012 // User + system time.
00013 double CPUTime();
00014 
00015 // Resident usage in bytes.
00016 uint64_t RSSMax();
00017 
00018 void PrintUsage(std::ostream &to);
00019 
00020 // Determine how much physical memory there is.  Return 0 on failure.
00021 uint64_t GuessPhysicalMemory();
00022 
00023 // Parse a size like unix sort.  Sadly, this means the default multiplier is K.
00024 uint64_t ParseSize(const std::string &arg);
00025 
00026 } // namespace util
00027 #endif // UTIL_USAGE_H