[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] [SCM] Gnash branch, objecturi, updated. db24b8893b2f3ca64
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] [SCM] Gnash branch, objecturi, updated. db24b8893b2f3ca643c7645d7b886cd58d851cca |
Date: |
Thu, 23 Sep 2010 09:25:46 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnash".
The branch, objecturi has been updated
via db24b8893b2f3ca643c7645d7b886cd58d851cca (commit)
from dbdee9eb7b0bf22f77325dc8a7f953670e68f093 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit//commit/?id=db24b8893b2f3ca643c7645d7b886cd58d851cca
commit db24b8893b2f3ca643c7645d7b886cd58d851cca
Author: Sandro Santilli <address@hidden>
Date: Thu Sep 23 11:25:18 2010 +0200
Have ObjectURI stats also use the generic class in Stats.h, keep stats by
lookup key here as well. Default to no stats.
diff --git a/libcore/ObjectURI.h b/libcore/ObjectURI.h
index 27ec582..8194834 100644
--- a/libcore/ObjectURI.h
+++ b/libcore/ObjectURI.h
@@ -7,10 +7,10 @@
#include <ostream>
#include <sstream>
-#define GNASH_DEBUG_OBJECT_URI_NOCASE 1
+//#define GNASH_STATS_OBJECT_URI_NOCASE_SKIP 1
-#ifdef GNASH_DEBUG_OBJECT_URI_NOCASE
-# include <iostream>
+#ifdef GNASH_STATS_OBJECT_URI_NOCASE_SKIP
+# include "Stats.h"
#endif
namespace gnash {
@@ -54,35 +54,22 @@ struct ObjectURI
return st.value(name);
}
-
-#ifdef GNASH_DEBUG_OBJECT_URI_NOCASE
- struct Counter {
- Counter(): skips(0), dos(0) {}
- int skips;
- int dos;
- void skip() { ++skips; }
- void doit() { ++dos; }
- ~Counter () {
- std::cerr << "Skipped " << skips << "/" << (skips+dos)
- << " (" << (double(skips)/double(skips+dos))
- << ") calls to noCase "<< std::endl;
- }
- };
-#endif
-
string_table::key noCase(string_table& st) const {
-#ifdef GNASH_DEBUG_OBJECT_URI_NOCASE
- static Counter stat;
-#endif
+
if ( ! nameNoCase ) {
nameNoCase = st.noCase(name);
-#ifdef GNASH_DEBUG_OBJECT_URI_NOCASE
- stat.doit();
+#ifdef GNASH_STATS_OBJECT_URI_NOCASE_SKIP
+ static stats::KeyLookup statNonSkip("ObjectURI::noCase non-skips",
st, 0, 0, 0);
+ statNonSkip.check(name);
#endif
}
-#ifdef GNASH_DEBUG_OBJECT_URI_NOCASE
- else stat.skip();
+#ifdef GNASH_STATS_OBJECT_URI_NOCASE_SKIP
+ else {
+ static stats::KeyLookup stat("ObjectURI::noCase skips", st, 0, 0,
0);
+ stat.check(name);
+ }
#endif
+
return nameNoCase;
}
-----------------------------------------------------------------------
Summary of changes:
libcore/ObjectURI.h | 39 +++++++++++++--------------------------
1 files changed, 13 insertions(+), 26 deletions(-)
hooks/post-receive
--
Gnash
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] [SCM] Gnash branch, objecturi, updated. db24b8893b2f3ca643c7645d7b886cd58d851cca,
Sandro Santilli <=