Alex Bikfalvi
SimStream Documentation
WorkloadSurf2Cat.h
00001 #pragma once 00002 00003 #include "Workload.h" 00004 00005 class CWorkloadSurf2Cat : public CWorkload 00006 { 00007 private: 00008 __uint32 numPopular; // M 00009 __uint32 probSurfing; // Q 00010 __uint32 probPopular; // P 00011 __uint32 probSurfForward; // a 00012 __uint32 probSurfCycle; // b 00013 00014 __time surfThreshold; 00015 00016 public: 00017 CWorkloadSurf2Cat( 00018 __uint32 numChannels, 00019 __uint32 numPopular, 00020 double probSurfing, 00021 double probPopular, 00022 double probSurfForward, 00023 double probSurfCycle 00024 ); 00025 ~CWorkloadSurf2Cat() {} 00026 00027 inline __time SurfingThreshold() { return this->surfThreshold; } 00028 00029 void GenerateUptime(__uint32 &newCh, __time &duration); 00030 void GenerateUptime(__uint32 oldCh, __time oldDuration, __uint32 &newCh, __time &duration); 00031 static __uint32 Cdf(__uint32 dindex); 00032 00033 protected: 00034 int Find(double value); 00035 __time Generate(__uint32 unit); 00036 };
Last updated: February 8, 2011