gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] /srv/bzr/gnash/rtmp r9757: count the number of times a Di


From: rob
Subject: [Gnash-commit] /srv/bzr/gnash/rtmp r9757: count the number of times a DistSream is accessed from the cache.
Date: Thu, 20 Nov 2008 13:57:02 -0700
User-agent: Bazaar (1.5)

------------------------------------------------------------
revno: 9757
committer: address@hidden
branch nick: rtmp
timestamp: Thu 2008-11-20 13:57:02 -0700
message:
  count the number of times a DistSream is accessed from the cache.
modified:
  libnet/diskstream.cpp
  libnet/diskstream.h
=== modified file 'libnet/diskstream.cpp'
--- a/libnet/diskstream.cpp     2008-11-20 02:30:01 +0000
+++ b/libnet/diskstream.cpp     2008-11-20 20:57:02 +0000
@@ -70,6 +70,7 @@
 //    GNASH_REPORT_FUNCTION;
 #ifdef USE_STATS_CACHE
     clock_gettime (CLOCK_REALTIME, &_last_access);
+    _accesses = 1;
 #endif
 }
 
@@ -85,6 +86,7 @@
     _filespec = str;
 #ifdef USE_STATS_CACHE
     clock_gettime (CLOCK_REALTIME, &_last_access);
+    _accesses = 1;
 #endif
 }
 
@@ -101,6 +103,7 @@
     _filespec = str;
 #ifdef USE_STATS_CACHE
     clock_gettime (CLOCK_REALTIME, &_last_access);
+    _accesses = 1;
 #endif
 }
 
@@ -293,6 +296,9 @@
 
     // the file is already open
     if (_state == OPEN) {
+#ifdef USE_STATS_CACHE
+       _accesses++;
+#endif
        return true;
     }
     

=== modified file 'libnet/diskstream.h'
--- a/libnet/diskstream.h       2008-11-20 02:30:01 +0000
+++ b/libnet/diskstream.h       2008-11-20 20:57:02 +0000
@@ -220,6 +220,7 @@
     ///
     /// @return A real pointer to the struct timespec of the last access.
     struct timespec *getFirstAccessTime() { return &_first_access; };
+    size_t getAccessCount() { return _accesses; };
 #endif    
 
     /// \brief Dump the internal data of this class in a human readable form.
@@ -287,6 +288,7 @@
     
 #ifdef USE_STATS_CACHE
     struct timespec _first_access;     // used for timing how long data stays 
in the queue.
+    size_t         _accesses;
 #endif
 
 #ifdef USE_STATS_FILE


reply via email to

[Prev in Thread] Current Thread [Next in Thread]