remove DM timestamps
The bot logs record and display their own now, and they're slightly nicer (color coded!). Change-Id: I4626f62ed0a12bbd0dd837bcc83d7809e4ae347d Reviewed-on: https://skia-review.googlesource.com/158663 Auto-Submit: Mike Klein <mtklein@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
This commit is contained in:
parent
209badfa6e
commit
21ba77273d
11
dm/DM.cpp
11
dm/DM.cpp
@ -40,7 +40,6 @@
|
||||
#include "SkTaskGroup.h"
|
||||
#include "SkTypeface_win.h"
|
||||
#include "Test.h"
|
||||
#include "Timer.h"
|
||||
#include "ios_utils.h"
|
||||
#include "sk_tool_utils.h"
|
||||
|
||||
@ -114,16 +113,11 @@ using sk_gpu_test::ContextInfo;
|
||||
|
||||
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
||||
|
||||
static const double kStartMs = SkTime::GetMSecs();
|
||||
|
||||
static FILE* gVLog;
|
||||
|
||||
template <typename... Args>
|
||||
static void vlog(const char* fmt, Args&&... args) {
|
||||
if (gVLog) {
|
||||
char s[64];
|
||||
HumanizeMs(s, 64, SkTime::GetMSecs() - kStartMs);
|
||||
fprintf(gVLog, "%s\t", s);
|
||||
fprintf(gVLog, fmt, args...);
|
||||
fflush(gVLog);
|
||||
}
|
||||
@ -187,11 +181,10 @@ static void done(const char* config, const char* src, const char* srcOptions, co
|
||||
|
||||
int curr = sk_tools::getCurrResidentSetSizeMB(),
|
||||
peak = sk_tools::getMaxResidentSetSizeMB();
|
||||
SkString elapsed = HumanizeMs(SkTime::GetMSecs() - kStartMs);
|
||||
|
||||
SkAutoMutexAcquire lock(gMutex);
|
||||
info("\n%dMB RAM, %dMB peak, %s elapsed, %d queued, %d active:\n",
|
||||
curr, peak, elapsed.c_str(), gPending - gRunning.count(), gRunning.count());
|
||||
info("\n%dMB RAM, %dMB peak, %d queued, %d active:\n",
|
||||
curr, peak, gPending - gRunning.count(), gRunning.count());
|
||||
for (auto& task : gRunning) {
|
||||
task.dump();
|
||||
}
|
||||
|
@ -6,8 +6,6 @@
|
||||
*/
|
||||
#include "Timer.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
SkString HumanizeMs(double ms) {
|
||||
if (ms > 60e+3) return SkStringPrintf("%.3gm", ms/60e+3);
|
||||
if (ms > 1e+3) return SkStringPrintf("%.3gs", ms/1e+3);
|
||||
@ -19,15 +17,3 @@ SkString HumanizeMs(double ms) {
|
||||
#endif
|
||||
return SkStringPrintf("%.3gms", ms);
|
||||
}
|
||||
|
||||
int HumanizeMs(char* s, int len, double ms) {
|
||||
if (ms > 60e+3) return snprintf(s, len, "%.3gm", ms / 60e+3);
|
||||
if (ms > 1e+3) return snprintf(s, len, "%.3gs", ms / 1e+3);
|
||||
if (ms < 1e-3) return snprintf(s, len, "%.3gns", ms*1e+6);
|
||||
#ifdef SK_BUILD_FOR_WIN
|
||||
if (ms < 1) return snprintf(s, len, "%.3gus", ms*1e+3);
|
||||
#else
|
||||
if (ms < 1) return snprintf(s, len, "%.3gµs", ms*1e+3);
|
||||
#endif
|
||||
return snprintf(s, len, "%.3gms", ms);
|
||||
}
|
||||
|
@ -22,6 +22,5 @@ public:
|
||||
};
|
||||
|
||||
SkString HumanizeMs(double);
|
||||
int HumanizeMs(char*, int len, double);
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user