Page Speed Optimization Libraries  1.13.35.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
net_instaweb::LockManagerSpammer Class Reference

#include "lock_manager_spammer.h"

Inheritance diagram for net_instaweb::LockManagerSpammer:
net_instaweb::ThreadSystem::Thread

Public Member Functions

void Granted (NamedLock *lock)
 Called when a lock is granted/denied.
 
void UnlockAfterGrant (NamedLock *lock)
 
void Denied (NamedLock *lock)
 
- Public Member Functions inherited from net_instaweb::ThreadSystem::Thread
 Thread (ThreadSystem *runtime, StringPiece name, ThreadFlags flags)
 
virtual ~Thread ()
 
bool Start ()
 
bool Started () const
 
void Join ()
 
GoogleString name () const
 

Static Public Member Functions

static void RunTests (int num_threads, int num_iters, int num_names, bool expecting_denials, bool delay_unlocks, ThreadSafeLockManager *lock_manager, Scheduler *scheduler)
 

Protected Member Functions

virtual void Run ()
 

Detailed Description

Test helper class for blasting a lock-manager with concurrent lock/unlock requests.

Member Function Documentation

static void net_instaweb::LockManagerSpammer::RunTests ( int  num_threads,
int  num_iters,
int  num_names,
bool  expecting_denials,
bool  delay_unlocks,
ThreadSafeLockManager lock_manager,
Scheduler scheduler 
)
static

num_threads indicates how many threads will run in parallel. num_iters indicates how many times each thread will run a big loop. num_names sets the number of different lock-names are locked and unlocked in the loop.


The documentation for this class was generated from the following file: