summaryrefslogtreecommitdiffstats
path: root/o3d/statsreport
diff options
context:
space:
mode:
Diffstat (limited to 'o3d/statsreport')
-rw-r--r--o3d/statsreport/aggregator-mac.mm4
-rw-r--r--o3d/statsreport/common/highres_timer_unittest.cc14
-rw-r--r--o3d/statsreport/metrics.cc6
-rw-r--r--o3d/statsreport/uploader_aggregation-mac.mm5
4 files changed, 14 insertions, 15 deletions
diff --git a/o3d/statsreport/aggregator-mac.mm b/o3d/statsreport/aggregator-mac.mm
index 69699ab..8f212b6 100644
--- a/o3d/statsreport/aggregator-mac.mm
+++ b/o3d/statsreport/aggregator-mac.mm
@@ -43,8 +43,8 @@ namespace stats_report {
MetricsAggregatorMac::MetricsAggregatorMac(const MetricCollection &coll)
: MetricsAggregator(coll),
- dict_(nil),
- pool_(nil){
+ pool_(nil),
+ dict_(nil) {
storePath_ = O3DStatsPath();
}
diff --git a/o3d/statsreport/common/highres_timer_unittest.cc b/o3d/statsreport/common/highres_timer_unittest.cc
index 7f40f10..8a62a91 100644
--- a/o3d/statsreport/common/highres_timer_unittest.cc
+++ b/o3d/statsreport/common/highres_timer_unittest.cc
@@ -47,14 +47,14 @@ TEST(HighresTimer, DISABLED_MillisecondClock) {
// note: this could fail if we context switch between initializing the timer
// and here. Very unlikely however.
- EXPECT_EQ(0, timer.GetElapsedMs());
+ EXPECT_EQ(0U, timer.GetElapsedMs());
timer.Start();
uint64 half_ms = HighresTimer::GetTimerFrequency() / 2000;
// busy wait for half a millisecond
while (timer.start_ticks() + half_ms > HighresTimer::GetCurrentTicks()) {
// Nothing
}
- EXPECT_EQ(1, timer.GetElapsedMs());
+ EXPECT_EQ(1U, timer.GetElapsedMs());
}
#ifndef BUILD_SERVER_BUILD
@@ -64,21 +64,21 @@ TEST(HighresTimer, DISABLED_SecondClock) {
#endif
HighresTimer timer;
- EXPECT_EQ(0, timer.GetElapsedSec());
+ EXPECT_EQ(0U, timer.GetElapsedSec());
#ifdef OS_WIN
::Sleep(250);
#else
struct timespec ts1 = {0, 250000000};
nanosleep(&ts1, 0);
#endif
- EXPECT_EQ(0, timer.GetElapsedSec());
- EXPECT_LE(230, timer.GetElapsedMs());
- EXPECT_GE(270, timer.GetElapsedMs());
+ EXPECT_EQ(0U, timer.GetElapsedSec());
+ EXPECT_LE(230U, timer.GetElapsedMs());
+ EXPECT_GE(270U, timer.GetElapsedMs());
#ifdef OS_WIN
::Sleep(251);
#else
struct timespec ts2 = {0, 251000000};
nanosleep(&ts2, 0);
#endif
- EXPECT_EQ(1, timer.GetElapsedSec());
+ EXPECT_EQ(1U, timer.GetElapsedSec());
}
diff --git a/o3d/statsreport/metrics.cc b/o3d/statsreport/metrics.cc
index 17dc3a1..b49202d 100644
--- a/o3d/statsreport/metrics.cc
+++ b/o3d/statsreport/metrics.cc
@@ -46,10 +46,14 @@ MetricCollectionBase g_global_metric_storage = { 0, 0 };
MetricCollection &g_global_metrics =
*static_cast<MetricCollection*>(&g_global_metric_storage);
+#ifdef OS_WIN
#pragma warning(push)
+#endif
// C4640: construction of local static object is not thread-safe.
// C4073: initializers put in library initialization area.
+#ifdef OS_WIN
#pragma warning(disable : 4640 4073)
+#endif
// Serialize all metric manipulation and access under this lock.
#ifdef OS_WIN
@@ -197,7 +201,7 @@ uint64 TimingMetric::average() const {
uint64 ret = 0;
if (0 == data_.count) {
- DCHECK_EQ(0, data_.sum);
+ DCHECK_EQ(0U, data_.sum);
} else {
ret = data_.sum / data_.count;
}
diff --git a/o3d/statsreport/uploader_aggregation-mac.mm b/o3d/statsreport/uploader_aggregation-mac.mm
index 5037f32..3db4800 100644
--- a/o3d/statsreport/uploader_aggregation-mac.mm
+++ b/o3d/statsreport/uploader_aggregation-mac.mm
@@ -116,11 +116,6 @@ static bool ReportMetrics(const char* extra_url_data,
}
void ResetPersistentMetrics() {
- NSError *error = nil;
- /*
- [[NSFileManager defaultManager] removeItemAtPath:O3DStatsPath()
- error:&error];
- */
[[NSFileManager defaultManager] removeFileAtPath:O3DStatsPath()
handler:nil];
}