Classes | Typedefs | Enumerations | Functions
throttling_manager_test.cpp File Reference
#include <aws/core/utils/Outcome.h>
#include <aws_common/sdk_utils/throttling_manager.h>
#include <gtest/gtest.h>
#include <atomic>
#include <thread>
#include <cmath>
Include dependency graph for throttling_manager_test.cpp:

Go to the source code of this file.

Classes

class  BaseClient
 
class  ThrottledClient
 

Typedefs

typedef Aws::Utils::Outcome< int, Aws::Client::AWSError< DummyClientErrors > > DummyOutcome
 

Enumerations

enum  DummyClientErrors { DummyClientErrors::THROTTLING_ERROR }
 

Functions

int main (int argc, char **argv)
 
void MakeCalls (ThrottledClient *throttled_client, std::chrono::milliseconds duration, std::chrono::microseconds sleep_duration)
 
 TEST (ThrottlingManagerTest, simpleThrottling)
 
 TEST (ThrottlingManagerTest, multiThreadedClientThrottling)
 

Typedef Documentation

typedef Aws::Utils::Outcome<int, Aws::Client::AWSError<DummyClientErrors> > DummyOutcome

Definition at line 24 of file throttling_manager_test.cpp.

Enumeration Type Documentation

enum DummyClientErrors
strong
Enumerator
THROTTLING_ERROR 

Definition at line 23 of file throttling_manager_test.cpp.

Function Documentation

int main ( int  argc,
char **  argv 
)

Definition at line 133 of file throttling_manager_test.cpp.

void MakeCalls ( ThrottledClient throttled_client,
std::chrono::milliseconds  duration,
std::chrono::microseconds  sleep_duration 
)

Thread routine. Calls the client's API for the duration specified, sleeping in between calls.

See also
multiThreadedClientThrottling test case

Definition at line 89 of file throttling_manager_test.cpp.

TEST ( ThrottlingManagerTest  ,
simpleThrottling   
)

Definition at line 58 of file throttling_manager_test.cpp.

TEST ( ThrottlingManagerTest  ,
multiThreadedClientThrottling   
)

Spawns multiple threads which call the throttled function & verifies that no more than max_tps calls reached the downstream client.

Definition at line 113 of file throttling_manager_test.cpp.



aws_common
Author(s): AWS RoboMaker
autogenerated on Sat Mar 6 2021 03:11:38