Skip to content
Snippets Groups Projects
Commit 341527f5 authored by Iheb Boussida's avatar Iheb Boussida
Browse files

Merge branch 'master' into 'main'

first commit

See merge request !1
parents 49d22375 203fdf0b
Branches
No related tags found
1 merge request!1first commit
{
"files.associations": {
"chrono": "cpp",
"cctype": "cpp",
"clocale": "cpp",
"cmath": "cpp",
"csignal": "cpp",
"cstdarg": "cpp",
"cstddef": "cpp",
"cstdio": "cpp",
"cstdlib": "cpp",
"cstring": "cpp",
"ctime": "cpp",
"cwchar": "cpp",
"cwctype": "cpp",
"any": "cpp",
"array": "cpp",
"atomic": "cpp",
"bit": "cpp",
"*.tcc": "cpp",
"bitset": "cpp",
"codecvt": "cpp",
"compare": "cpp",
"complex": "cpp",
"concepts": "cpp",
"condition_variable": "cpp",
"coroutine": "cpp",
"cstdint": "cpp",
"deque": "cpp",
"list": "cpp",
"map": "cpp",
"set": "cpp",
"string": "cpp",
"unordered_map": "cpp",
"vector": "cpp",
"exception": "cpp",
"algorithm": "cpp",
"functional": "cpp",
"iterator": "cpp",
"memory": "cpp",
"memory_resource": "cpp",
"numeric": "cpp",
"optional": "cpp",
"random": "cpp",
"ratio": "cpp",
"source_location": "cpp",
"string_view": "cpp",
"system_error": "cpp",
"tuple": "cpp",
"type_traits": "cpp",
"utility": "cpp",
"fstream": "cpp",
"future": "cpp",
"initializer_list": "cpp",
"iomanip": "cpp",
"iosfwd": "cpp",
"iostream": "cpp",
"istream": "cpp",
"limits": "cpp",
"mutex": "cpp",
"new": "cpp",
"numbers": "cpp",
"ostream": "cpp",
"semaphore": "cpp",
"sstream": "cpp",
"stdexcept": "cpp",
"stop_token": "cpp",
"streambuf": "cpp",
"thread": "cpp",
"cinttypes": "cpp",
"typeindex": "cpp",
"typeinfo": "cpp",
"variant": "cpp",
"csetjmp": "cpp",
"barrier": "cpp",
"cfenv": "cpp",
"charconv": "cpp",
"cuchar": "cpp",
"forward_list": "cpp",
"unordered_set": "cpp",
"regex": "cpp",
"latch": "cpp",
"ranges": "cpp",
"scoped_allocator": "cpp",
"shared_mutex": "cpp",
"span": "cpp",
"syncstream": "cpp",
"valarray": "cpp"
}
}
\ No newline at end of file
#include <iostream>
#include <boost/asio.hpp>
#include <chrono>
#include <fstream>
#include <vector>
#include <thread>
#include <random>
using boost::asio::ip::tcp;
void client(const std::string& host, const std::string& port, int client_id, std::vector<double>& durations, std::exponential_distribution<>& dist, std::default_random_engine& generator) {
try {
boost::asio::io_context io_context;
tcp::resolver resolver(io_context);
tcp::resolver::results_type endpoints = resolver.resolve(host, port);
tcp::socket socket(io_context);
auto start = std::chrono::high_resolution_clock::now();
boost::asio::connect(socket, endpoints);
char response[512];
boost::system::error_code error;
size_t length = socket.read_some(boost::asio::buffer(response), error);
auto end = std::chrono::high_resolution_clock::now();
std::chrono::duration<double> duration = end - start;
if (error == boost::asio::error::eof)
return;
else if (error)
throw boost::system::system_error(error);
durations[client_id] = duration.count();
std::cout << "Client " << client_id << " Server response: " << std::string(response, length) << std::endl;
std::ofstream file("./logs/log_4server_50ms_bearbeitungszeit.txt", std::ios_base::app) ;
std::cout<<"duration " << duration.count() <<std::endl ;
file<< duration.count() <<std::endl ;
} catch (std::exception& e) {
std::cerr << "Exception: " << e.what() << "\n";
}
}
int main() {
const int num_clients = 1000;
std::vector<std::thread> clients;
std::vector<double> durations(num_clients);
std::random_device rd;
std::default_random_engine generator(rd());
std::exponential_distribution<> dist(1.0 / 3.0);
auto total_start = std::chrono::high_resolution_clock::now();
for (int i = 0; i < num_clients; ++i) {
double wait_time = dist(generator);
std::this_thread::sleep_for(std::chrono::milliseconds((int)wait_time));
clients.emplace_back(client, "app", "12345", i, std::ref(durations), std::ref(dist), std::ref(generator));
}
for (auto& t : clients) {
t.join();
}
auto total_end = std::chrono::high_resolution_clock::now();
std::chrono::duration<double, std::milli> total_duration = total_end - total_start;
std::cout << "Total time to handle 1000 clients: " << total_duration.count() << " ms" << std::endl;
std::ofstream log_file("client_log.txt", std::ios_base::app);
if (log_file.is_open()) {
log_file << "Total time to handle 1000 clients: " << total_duration.count() << " ms" << std::endl;
log_file.close();
} else {
std::cerr << "Unable to open log file." << std::endl;
}
return 0;
}
Total time to handle 1000 clients(4 server): 5583.22 ms
Total time to handle 1000 clients(ome server): 13142.7 ms
#include <iostream>
#include <thread>
#include <mutex>
#include <condition_variable>
#include <queue>
#include <vector>
#include <chrono>
#include <random>
const int BUFFER_SIZE = 10;
std::queue<int> buffer;
std::mutex mtx;
std::condition_variable cv_producer;
std::condition_variable cv_consumer;
void producer(int id) {
int produced_item = 0;
while (true) {
std::cout << "es gibt so viel item im Buffer : "<<buffer.size()<< std::endl ;
std::random_device rd;
std::mt19937 gen(rd());
double lambda = 1.0 / 3.0;
std::exponential_distribution<> dist(lambda);
double wait_time_ms = dist(gen);
std::this_thread::sleep_for(std::chrono::milliseconds((int)wait_time_ms));
std::unique_lock<std::mutex> lock(mtx);
cv_producer.wait(lock, [] { return buffer.size() < BUFFER_SIZE; });
produced_item++;
buffer.push(produced_item);
std::cout << "Producer " << id << " produced item " << produced_item << "\n";
cv_consumer.notify_all();
lock.unlock();
}
}
void consumer(int id) {
while (true) {
std::random_device rd;
std::mt19937 gen(rd());
double lambda = 1.0 / 70.0;
std::exponential_distribution<> dist(lambda);
double wait_time_ms = dist(gen);
std::this_thread::sleep_for(std::chrono::milliseconds((int)wait_time_ms));
std::unique_lock<std::mutex> lock(mtx);
cv_consumer.wait(lock, [] { return !buffer.empty(); });
// Consume an item from the buffer
int consumed_item = buffer.front();
buffer.pop();
std::cout << "Consumer " << id << " consumed item " << consumed_item << "\n";
cv_producer.notify_all();
lock.unlock();
}
}
int main() {
std::vector<std::thread> producers, consumers;
for (int i = 0; i < 1; ++i) {
producers.emplace_back(producer, i+1);
}
for (int i = 0; i < 3; ++i) {
consumers.emplace_back(consumer, i+1);
}
for (auto& p : producers) {
p.join();
}
for (auto& c : consumers) {
c.join();
}
return 0;
}
version: '3.8'
services:
app:
build:
context: .
dockerfile: dockerfile
tty: true
stdin_open: true
deploy:
mode: replicated
replicas: 4
client:
build:
context: .
dockerfile: dockerfile.client
tty: true
stdin_open: true
volumes:
- ./logs:/app/logs
- .:/app/
depends_on:
- app
\ No newline at end of file
FROM ubuntu:latest
RUN apt-get update
RUN apt-get -y install libboost-all-dev
RUN apt install siege
RUN apt install -y g++
COPY ./server.cpp .
RUN g++ server.cpp -o server
CMD [ "./server" ]
\ No newline at end of file
FROM ubuntu:latest
RUN apt-get update
RUN apt-get -y install libboost-all-dev
RUN apt install siege
RUN apt install -y g++
WORKDIR /app
COPY ./client.cpp /app
CMD g++ client.cpp -o client && chmod +x client && ./client
\ No newline at end of file
0.00723201
0.0844815
0.132214
0.161721
0.211061
0.270705
0.399579
0.402885
0.434311
0.478948
0.501492
0.598122
0.651361
0.690967
0.614725
0.638214
0.651778
0.710448
0.761233
0.813918
0.854198
0.871212
0.903642
0.921402
0.928392
0.945083
0.907827
0.957304
0.921319
0.974869
0.975548
0.976002
1.03865
1.05951
1.07322
1.15168
1.17342
1.22441
1.22595
1.22852
1.24017
1.25378
1.27047
1.27816
1.28691
1.38064
1.49934
1.52598
1.53771
1.67207
1.70553
1.70775
1.77018
1.77257
1.77921
1.78999
1.79559
1.83232
1.85732
1.8901
1.89489
1.97553
1.98011
1.98787
2.02351
2.08693
2.0359
2.03674
2.13546
2.15309
2.21957
2.25305
2.25764
2.28709
2.3605
2.38912
2.42179
2.4262
2.43383
2.45342
2.48729
2.51699
2.52771
2.57441
2.60408
2.6068
2.63048
2.66138
2.67512
2.67554
2.70054
2.75442
2.76304
2.78168
2.78324
2.83881
2.88443
3.01922
3.02883
3.03347
3.04694
3.10373
3.10845
3.13921
3.14626
3.16097
3.20524
3.24695
3.25685
3.26048
3.28363
3.29901
3.32878
3.33224
3.37588
3.41353
3.42728
3.45773
3.46382
3.51755
3.55135
3.59294
3.6059
3.62453
3.6421
3.72285
3.72213
3.75576
3.78234
3.86485
3.86765
3.89396
3.82869
3.82858
3.85408
3.87341
3.8861
3.89769
3.9013
3.933
4.02065
4.0242
4.02589
4.07032
4.07993
4.08649
4.09218
4.1519
4.16247
4.17891
4.19166
4.20223
4.20777
4.25322
4.25696
4.28252
4.33315
4.35893
4.38254
4.42622
4.46705
4.50654
4.55409
4.56678
4.58147
4.58509
4.63861
4.68968
4.69424
4.69883
4.69385
4.69756
4.71213
4.7369
4.78266
4.78422
4.83762
4.84386
4.89851
5.00839
5.01096
5.02483
5.03722
5.05511
5.09472
5.14951
5.15163
5.18345
5.28643
5.29693
5.29535
5.33293
5.33881
5.33814
5.34604
5.41365
5.4163
5.41967
5.49122
5.52623
5.52233
5.55393
5.56342
5.57108
5.58683
5.62378
5.63754
5.63928
5.68434
5.68156
5.68306
5.67919
5.68761
5.72937
5.75153
5.77191
5.77872
5.79869
5.81041
5.81807
5.81118
5.82288
5.85025
5.87883
5.95357
5.95149
6.00106
6.01964
6.02928
6.03923
6.04886
6.12967
6.20023
6.21559
6.28658
6.31018
6.33372
6.37151
6.37623
6.41618
6.4725
6.48685
6.48865
6.52578
6.53716
6.55689
6.55517
6.56877
6.58459
6.58727
6.61875
6.61835
6.62674
6.67858
6.68402
6.71889
6.73459
6.77148
6.77916
6.82091
6.85602
6.86396
6.85785
6.87454
6.89929
6.91287
6.8547
6.89658
6.91325
6.91786
6.92739
7.00416
7.03888
7.05243
7.1053
7.11504
7.14477
7.16628
7.17787
7.21362
7.32316
7.33772
7.43131
7.46105
7.54065
7.54421
7.56693
7.6029
7.64386
7.7019
7.71684
7.71764
7.71594
7.76768
7.77712
7.8186
7.93628
7.94381
8.10869
8.1112
8.13607
8.21575
8.22849
8.23595
8.25438
8.27423
8.31292
8.34752
8.36301
8.44696
8.48948
8.52614
8.52986
8.52533
8.54352
8.55451
8.59829
8.60769
8.65905
8.65839
8.67558
8.67753
8.69052
8.75399
8.77172
8.77331
8.77879
8.79152
8.78617
8.78536
8.7962
8.786
8.81367
8.83547
8.93817
8.93485
8.93286
8.9336
8.95616
8.96926
9.00788
9.07274
9.17167
9.23953
9.25035
9.25134
9.2579
9.26202
9.27773
9.28787
9.32309
9.39395
9.48783
9.50473
9.52802
9.53086
9.53946
9.55909
9.60517
9.62469
9.62856
9.62722
9.62717
9.63219
9.68293
9.68542
9.70796
9.713
9.78861
9.7995
9.83613
9.88607
9.95672
9.95812
9.9556
9.98479
10.1297
10.15
10.157
10.1638
10.185
10.2263
10.2397
10.2362
10.2469
10.2581
10.2664
10.269
10.2791
10.2818
10.3925
10.4402
10.49
10.5219
10.5218
10.526
10.5541
10.6001
10.6127
10.6756
10.7194
10.7263
10.7566
10.7625
10.7597
10.7694
10.7886
10.8183
10.8189
10.8461
10.8476
10.8547
10.8842
10.8848
10.9961
11.0147
11.0264
11.1334
11.1581
11.2737
11.4009
11.4012
11.4367
11.4405
11.4952
11.499
11.4996
11.5082
11.5174
11.5337
11.5444
11.588
11.6002
11.6037
11.6112
11.6201
11.6222
11.6225
11.6262
11.7147
11.7261
11.8026
11.8512
11.8735
11.873
11.8817
11.8833
11.8935
11.8952
11.9068
11.9148
11.9397
12.002
12.0226
12.0273
12.0509
12.0417
12.0867
12.1356
12.143
12.1401
12.1615
12.166
12.1716
12.2027
12.2234
12.242
12.2755
12.2892
12.3637
12.3817
12.4141
12.437
12.4946
12.5183
12.5489
12.5755
12.6054
12.6152
12.6784
12.7871
12.8062
12.826
12.8328
12.8742
12.993
13.0139
13.0177
13.0191
13.0302
13.0489
13.0493
13.051
13.0575
13.076
13.0847
13.1736
13.229
13.2541
13.3048
13.4315
13.4317
13.4701
13.5236
13.5199
13.5375
13.5519
13.5685
13.61
13.6089
13.6291
13.6568
13.6648
13.6875
13.7285
13.7295
13.7661
13.7889
13.8125
13.8782
14.0616
14.0795
14.0984
14.2661
14.2754
14.2824
14.3082
14.3547
14.3673
14.3653
14.4103
14.424
14.439
14.4442
14.5008
14.5853
14.5892
14.6184
14.6431
14.6567
14.6571
14.6887
14.7703
14.8019
14.8115
14.8343
14.8723
14.8898
14.9077
14.9255
14.9442
14.9518
15.0665
15.1922
15.2007
15.2595
15.2751
15.3061
15.3359
15.3447
15.3894
15.444
15.5897
15.5865
15.5861
15.6153
15.6277
15.6692
15.6808
15.6933
15.6937
15.7
15.7227
15.7495
15.7493
15.8296
15.8334
15.8359
15.8374
15.8542
15.8876
15.8961
15.9556
15.956
15.9707
15.971
15.9923
15.99
16.0115
16.059
16.0723
16.0889
16.1037
16.1012
16.1145
16.1215
16.1438
16.1466
16.2008
16.2438
16.2524
16.2662
16.285
16.3247
16.339
16.3374
16.3547
16.3766
16.4524
16.4504
16.5232
16.5826
16.5903
16.5921
16.6119
16.6422
16.6417
16.6685
16.6863
16.6865
16.7492
16.7921
16.8059
16.8108
16.8324
16.867
16.8991
16.9161
16.919
16.9749
16.9814
16.9871
16.9897
16.9902
16.9913
17.001
17.0037
17.0502
17.0778
17.0783
17.118
17.1405
17.1951
17.2154
17.2227
17.2576
17.2733
17.2939
17.3265
17.4091
17.5561
17.5577
17.5729
17.5878
17.6274
17.6458
17.6415
17.646
17.6486
17.6542
17.7129
17.7146
17.7867
17.8305
17.8532
17.8741
17.8733
17.8949
17.9052
17.9046
17.9033
17.9109
17.9465
17.9646
18.0623
18.0897
18.0976
18.0957
18.1495
18.2322
18.2505
18.2667
18.2884
18.3151
18.3719
18.3834
18.4311
18.4429
18.4436
18.453
18.5289
18.5295
18.5317
18.5512
18.5738
18.6407
18.6675
18.7
18.7042
18.7096
18.7423
18.7438
18.765
18.7945
18.794
18.8157
18.8753
18.881
18.9116
18.9852
19.02
19.0172
19.0589
19.0765
19.1161
19.1204
19.1329
19.155
19.2466
19.2612
19.2766
19.314
19.333
19.3924
19.3922
19.4009
19.5665
19.6339
19.6346
19.7585
19.7842
19.8419
19.8432
19.8972
19.9079
19.9467
20.0223
20.0302
20.033
20.0366
20.036
20.0847
20.1215
20.1612
20.1613
20.2338
20.2504
20.3431
20.3738
20.3881
20.4089
20.4155
20.4941
20.5868
20.5856
20.5941
20.5934
20.6001
20.6047
20.6333
20.6619
20.6934
20.7384
20.7435
20.7438
20.7604
20.7632
20.7687
20.7731
20.8046
20.839
20.8556
20.865
20.9416
20.9573
20.9706
21.0092
21.0361
21.0495
21.0581
21.1157
21.1655
21.1995
21.2501
21.2969
21.3224
21.3573
21.3577
21.4423
21.5242
21.5258
21.5364
21.5949
21.5938
21.6489
21.6507
21.6994
21.706
21.7648
21.8211
21.8556
21.8963
21.9147
21.969
22.0096
22.0794
22.1024
22.0986
22.132
22.1396
22.1617
22.2215
22.2576
22.399
22.3974
22.4172
22.4607
22.5343
22.6215
22.6231
22.6328
22.6402
22.6528
22.7942
22.807
22.8456
22.8523
22.8498
22.8653
22.8718
22.9006
22.9019
22.9123
22.9199
22.9205
22.9468
22.9424
23.1132
23.119
23.1269
23.185
23.2277
23.2559
23.2885
23.328
23.3326
23.3442
23.4027
23.4388
23.4413
23.4339
23.4795
23.4901
23.5106
23.5737
23.5828
23.6126
23.6326
23.6418
23.6592
23.661
23.6705
23.7097
23.7328
23.7625
23.793
23.8087
23.8665
23.9577
23.9964
24.0312
24.0367
24.1392
24.1827
24.2127
24.2383
24.2508
24.2976
24.3613
24.5412
24.5446
24.5686
24.5771
24.5947
24.5949
24.6207
24.7315
24.741
24.7817
24.9321
24.949
24.9493
25.0108
25.0164
25.0178
25.0204
25.0175
25.0459
25.0472
25.1028
25.1192
25.1187
25.1201
25.1183
25.1659
25.1662
25.2357
25.2678
25.2895
25.355
25.4214
25.4646
25.4835
25.5886
25.6447
25.6496
25.6742
25.7088
25.7554
25.767
25.7793
25.818
25.8474
25.8699
25.8763
25.8849
25.9005
25.878
25.8953
25.8991
25.926
25.9304
26.0741
26.0818
26.0925
26.0898
26.1053
26.1079
26.1182
26.1478
26.2105
26.2132
26.2127
26.2202
26.3106
26.3219
26.3625
26.3901
26.4205
26.4284
26.4278
26.4394
26.5053
26.5597
26.5685
26.5702
26.6198
26.6366
26.6372
26.6795
26.6965
26.7497
26.8084
26.8239
26.8313
26.8584
26.939
26.9597
26.9744
26.9944
26.9972
27.1048
27.1019
27.1214
27.1196
27.1512
27.255
27.3441
27.3856
27.388
27.536
27.5441
27.5523
27.5709
27.5779
27.5877
27.6053
27.6014
27.6132
27.6238
27.6709
27.6899
27.6975
27.7032
27.7046
27.7129
27.7174
27.75
27.7607
27.779
0.0129209
0.213991
0.261106
0.324578
0.346411
0.358894
0.422631
0.425318
0.443885
0.483334
0.483693
0.531124
0.538666
0.5259
0.565837
0.610528
0.764804
0.703734
0.74635
0.808126
0.828661
0.85169
0.853185
0.859618
0.893429
0.897261
0.967976
1.02483
1.02738
1.0931
1.11971
1.14035
1.15202
1.16573
1.1983
1.2399
1.24505
1.28499
1.31695
1.38064
1.4134
1.4561
1.47474
1.51835
1.54302
1.61253
1.64117
1.69977
1.7363
1.76901
1.83901
1.85236
2.0007
1.95005
1.95156
2.0427
2.0309
2.03132
2.03696
2.03957
2.07036
2.07412
2.10474
2.1125
2.11924
2.13808
2.14657
2.16739
2.173
2.23654
2.28616
2.33976
2.38839
2.42601
2.44291
2.46319
2.53082
2.53949
2.54412
2.63751
2.68611
2.63419
2.69191
2.73461
2.75235
2.76097
2.80663
2.82445
2.84009
2.89674
2.93053
2.93562
2.95444
3.01243
3.02323
3.03434
3.11819
3.22705
3.32072
3.33851
3.42398
3.47476
3.48648
3.54123
3.55292
3.5567
3.56339
3.56698
3.58171
3.61464
3.63324
3.66473
3.70627
3.70973
3.76125
3.77375
3.85834
3.88304
3.91299
3.92259
3.9852
3.98981
3.99746
3.99769
4.07436
4.07138
4.11695
4.11738
4.14465
4.15334
4.11154
4.13129
4.14348
4.16903
4.24241
4.28486
4.31442
4.35097
4.38448
4.41104
4.43959
4.43988
4.45442
4.50495
4.54156
4.57626
4.57762
4.58521
4.62774
4.6445
4.71627
4.7349
4.81252
4.83501
4.87056
4.91131
4.92296
4.93969
4.9622
0.0441089
0.0165119
0.0869723
0.129951
0.142992
0.147752
0.163454
0.176304
0.176604
0.177822
0.183415
0.0685725
0.0677583
0.00858549
0.0843147
0.268622
0.100544
0.17236
0.295989
0.10654
0.108657
0.10976
0.119302
0.128009
0.387524
0.323875
0.282786
0.291981
0.298715
0.301092
0.316076
0.323156
0.347274
0.358435
0.360259
0.560046
0.363838
0.389583
0.473817
0.407449
0.489211
0.413135
0.516637
0.4393
0.463658
0.466816
0.497143
0.5025
0.506228
0.533546
0.571647
0.595703
0.575919
0.65507
0.664795
0.691295
0.642247
0.711963
0.71956
0.679248
0.763071
0.766256
0.703467
0.708683
0.722923
0.724539
0.801064
0.739839
0.748729
0.777692
0.851848
0.866782
0.808327
0.843897
0.919808
0.885941
0.887253
0.902515
0.983381
0.924744
0.929212
1.0316
0.960658
0.962224
0.972086
0.988621
1.00774
1.01253
1.02521
1.10396
1.0447
1.05029
1.0562
1.13949
1.06481
1.06358
1.08477
1.16276
1.06389
1.14309
1.15771
1.18028
1.21706
1.23249
1.35008
1.23235
1.22859
1.36184
1.24914
1.18398
1.31294
1.32408
1.32979
1.20875
1.35775
1.23234
1.24387
1.28651
1.47539
1.40246
1.50105
1.5023
1.52227
1.51544
1.60215
1.42191
1.53644
1.63066
1.5517
1.67897
1.62215
1.60705
1.65239
1.7474
1.54619
1.54917
1.56245
1.71149
1.56614
1.76605
1.80269
1.78394
1.76181
1.81736
1.68793
1.83623
1.75679
1.89144
1.76688
1.69544
1.89925
1.70278
1.87075
1.79857
1.94389
1.82987
1.85065
1.86298
1.99964
2.00204
1.77752
2.03455
1.92337
1.92638
1.9196
2.10542
2.10604
1.98774
1.8601
1.8605
1.99596
2.12775
1.8578
2.13127
1.84182
2.14039
2.02648
1.87991
2.20262
2.05273
2.18791
2.1638
1.9204
1.92094
2.07896
2.07809
2.127
2.13357
2.13899
2.14284
2.14423
2.14402
2.16368
2.16888
1.98854
2.16512
2.04321
2.08792
2.23253
2.09332
2.30056
2.30215
2.32031
2.31145
2.11152
2.36295
2.36827
2.38577
2.36312
2.31616
2.35966
2.34498
2.34917
2.36469
2.21467
2.34881
2.39315
2.39552
2.40902
2.43717
2.2861
2.45114
2.44018
2.31231
2.32063
2.33086
2.52735
2.51115
2.5265
2.52928
2.51564
2.35147
2.3439
2.5438
2.54197
2.36409
2.58375
2.56308
2.60556
2.41744
2.64011
2.44539
2.64667
2.44963
2.65843
2.45427
2.66928
2.67198
2.66456
2.71951
2.70792
2.49453
2.79613
2.71374
2.52097
2.71616
2.82949
2.82603
2.85169
2.88759
2.86826
2.61531
2.88735
2.89104
2.64125
2.93878
2.66081
2.68045
2.70462
2.97583
2.91421
3.01776
2.74713
2.99039
3.03681
2.96527
3.06873
2.81271
2.99829
3.10095
2.84924
3.00465
3.11236
3.05137
3.05093
3.14371
3.15732
3.06953
3.1759
3.15084
3.07753
3.09308
3.01916
3.20003
3.05642
3.24754
3.24496
3.24851
3.23909
3.14468
3.14866
3.31883
3.32988
3.33069
3.1799
3.32022
3.3256
3.18273
3.38046
3.23051
3.23425
3.40863
3.42785
3.23002
3.41134
3.41511
3.2666
3.45925
3.4333
3.33864
3.35625
3.31026
3.28471
3.52218
3.282
3.50928
3.27789
3.5749
3.47006
3.61784
3.38757
3.63542
3.55308
3.67233
3.55424
3.5316
3.549
3.46831
3.6382
3.49661
3.67031
3.6248
3.54154
3.51553
3.77336
3.78104
3.5561
3.79423
3.79438
3.56535
3.58546
3.77308
3.76189
3.66464
3.84109
3.68222
3.69653
3.88283
3.9761
3.6927
3.99075
4.00246
3.72326
4.01785
4.02232
4.03042
3.93668
4.03049
4.03644
4.05401
4.02455
4.0467
3.7922
4.09934
4.15011
4.10262
4.11188
3.86432
4.08739
4.08281
4.13044
4.10656
3.90104
4.21253
4.21409
3.92067
4.12813
4.14691
4.12444
4.16429
4.23996
4.18326
4.27025
4.26154
4.22682
4.30018
4.05911
4.29613
4.27854
4.31721
4.28599
4.10754
4.09495
4.32304
4.28217
4.29167
4.38784
4.28574
4.26818
4.12782
4.30194
4.13619
4.44901
4.44694
4.41747
4.33604
4.34179
4.3888
4.47299
4.3537
4.35002
4.23805
4.24108
4.22025
4.56877
4.58137
4.49895
4.58375
4.50826
4.57526
4.52482
4.29654
4.47637
4.27287
4.59151
4.54112
4.28816
4.292
4.32024
4.63842
4.54685
4.66104
4.6622
4.66262
4.63316
4.63032
4.66244
4.71268
4.66173
4.6784
4.67237
4.66564
4.67203
4.78492
4.69627
4.80872
4.82726
4.83222
4.72669
4.60841
4.74625
4.83098
4.84145
4.65364
4.85079
4.96117
4.82458
4.91632
4.95851
4.68831
4.68549
4.93315
4.964
4.88878
4.99025
4.78229
4.93179
5.0383
5.03848
4.80366
5.03779
5.08585
5.10054
5.09065
5.10384
5.03234
5.13276
4.91965
5.10294
5.19138
4.94955
5.11673
5.20475
4.98456
5.23617
5.03005
5.30773
5.32968
5.34214
5.11787
5.30695
5.29556
5.29072
5.30311
5.4129
5.30479
5.18084
5.41839
5.45597
5.35483
5.22434
5.38147
5.4314
5.27758
5.42111
5.52964
5.55642
5.53769
5.55614
5.31874
5.58498
5.33348
5.52994
5.5415
5.45914
5.35765
5.66683
5.52596
5.53979
5.63799
5.54856
5.72254
5.58419
5.75051
5.60177
5.50782
5.50524
5.72208
5.75078
5.72365
5.7128
5.53179
5.7295
5.66541
5.75404
5.74983
5.74908
5.81594
5.57957
5.76195
5.71919
5.83866
5.74248
5.60456
5.60717
5.86338
5.76251
5.89619
5.64776
5.88074
5.9329
5.91539
5.83642
5.70495
5.96501
5.99238
5.98469
5.7731
5.91828
6.00597
6.04365
5.82409
5.96482
6.1136
5.88007
6.1346
6.14639
5.90531
6.05607
5.79843
6.17265
6.175
5.81798
6.19513
6.2036
5.8446
5.85588
6.21241
6.21759
6.2488
5.89952
5.90204
6.25401
6.28386
6.21883
5.95748
6.21044
6.33757
6.20514
6.18146
6.3478
6.36251
6.33184
6.05117
6.38855
6.23769
6.41042
6.43151
6.17102
6.49251
6.3478
6.33897
6.51365
6.36261
6.52461
6.26235
6.32236
6.5893
6.62702
6.33921
6.34697
6.65325
6.67152
6.6359
6.64531
6.53295
6.80811
6.81547
6.7448
6.60459
6.6199
6.78141
6.90301
6.6266
6.85174
6.95254
6.74264
6.91609
6.76826
6.70064
6.77767
6.70709
6.72607
6.67803
6.97792
6.8452
6.85161
6.90541
7.11161
6.96825
6.9694
6.86315
7.04855
6.89253
7.07407
6.89595
6.89945
7.08988
7.0657
6.87584
7.24976
7.07471
7.28645
7.07816
7.05469
7.2985
7.05901
7.30692
7.31824
6.95613
6.94182
7.21726
7.33493
7.09858
7.22793
7.23497
6.97466
7.24838
7.11885
6.98587
7.14126
7.28145
7.1658
7.3548
7.09713
7.38495
7.25431
7.44337
7.44995
7.29183
7.18271
7.47865
7.33475
7.2064
7.21307
7.19333
7.52558
7.52686
7.56663
7.39391
7.26126
7.59317
7.59418
7.60888
7.41986
7.43324
7.66306
7.63683
7.67897
7.35258
7.34771
7.47238
7.70065
7.47739
7.71065
7.49466
7.7636
7.53066
7.76037
7.79045
7.5844
7.80353
7.58346
7.84911
7.8414
7.87118
7.65786
7.90192
7.65051
7.62135
7.68093
7.93468
7.90836
7.60186
7.60396
7.92101
7.66505
7.67529
7.97703
7.61131
7.68421
7.98065
7.96734
7.97181
7.65199
8.02008
7.73166
7.72671
7.68129
8.00272
8.03598
8.05203
7.73515
7.79081
7.729
7.76398
8.13541
7.84352
8.1382
8.16665
7.74881
8.17221
7.8824
7.76137
8.21808
8.20821
7.75132
7.75266
7.75148
7.74741
8.21484
8.21103
8.22001
8.21726
8.21343
7.75744
8.23138
8.24954
8.26843
8.24895
8.28873
8.26759
8.2904
8.25013
8.26799
8.0927
8.08998
8.08126
7.90811
7.89295
7.89457
8.09371
8.11281
7.95384
8.34047
8.37768
8.33957
7.99601
8.36201
8.24878
8.27136
8.07918
8.50239
8.4274
8.50789
8.32288
8.53248
8.45676
8.56169
8.16195
8.48269
8.58068
8.57929
8.20521
8.58727
8.20186
8.45311
8.47749
8.23805
8.58594
8.48732
8.62346
8.52261
8.70358
8.30507
8.55742
8.66963
8.74281
8.69255
8.69624
8.80297
8.66512
8.77929
8.4432
8.74597
8.75935
8.68549
8.86787
8.68397
8.68762
8.69145
8.68284
8.92769
8.8474
8.60168
8.97836
8.76039
8.61017
8.78949
8.64849
9.03539
9.031
9.04712
8.84256
8.72407
9.08463
8.74734
8.74985
9.05124
9.10881
8.92854
9.10713
8.7913
8.93092
9.1148
9.12258
9.12479
9.08649
9.11528
8.8364
9.13629
9.19708
9.15886
8.88994
8.87975
9.2164
9.17939
9.25127
9.20695
9.21627
9.21605
9.21687
9.16781
9.32603
9.23465
9.33656
9.33392
9.19084
9.19328
9.03335
9.34403
9.31812
9.22867
9.29491
9.29276
9.3174
9.31395
9.35193
9.14531
9.30536
9.14649
9.31819
9.31575
9.39127
9.17476
9.43545
9.19835
9.42164
9.20344
9.34394
9.37026
9.25989
9.50335
9.26988
9.28169
9.50674
9.52004
9.32507
9.47302
9.30696
9.48637
9.58601
9.52242
9.59263
9.55832
9.59184
9.56184
9.53901
9.53829
9.40908
9.54942
9.53279
9.43304
9.67615
9.45492
9.74754
9.74932
9.61928
9.77509
9.65389
9.76913
9.65659
9.78194
9.7687
9.80753
9.8718
9.82206
9.92033
9.93726
9.87331
9.90059
9.9044
9.94515
9.94128
9.97939
9.9972
10.0007
9.98727
10.0225
10.0652
10.0417
10.0465
10.0732
10.1069
10.091
10.1074
10.1025
10.1165
10.1083
10.1115
10.1238
10.1434
10.1594
10.1563
10.1567
10.1571
10.1779
10.1743
10.1747
10.1554
10.2121
10.1985
10.2027
10.2351
10.2262
10.234
10.2998
10.3102
10.2974
10.3143
10.3001
10.2978
10.2948
10.3231
10.3231
10.351
10.3545
10.3742
10.4298
10.4377
0.0156573
0.0164012
0.0820022
0.0533822
0.0778501
0.100206
0.0221978
0.13462
0.0380682
0.13993
0.256097
0.123323
0.257747
0.325752
0.345101
0.271745
0.356364
0.382458
0.352699
0.401609
0.319935
0.321461
0.465156
0.474962
0.431659
0.441177
0.494729
0.457913
0.378921
0.389523
0.392088
0.492996
0.506508
0.417493
0.365446
0.362894
0.370065
0.567175
0.572912
0.581011
0.581843
0.503046
0.593446
0.515555
0.576597
0.486416
0.483663
0.694163
0.607147
0.69355
0.725255
0.71389
0.735172
0.675264
0.674234
0.67949
0.684165
0.578672
0.775639
0.747916
0.806225
0.813173
0.659194
0.859687
0.874188
0.907908
0.924294
0.764171
0.960369
0.973
0.796732
0.987547
0.795825
1.0124
1.02887
0.749241
1.04818
1.08925
1.09044
1.11007
1.10606
0.824201
1.11106
0.828675
1.03231
0.833654
1.04153
1.15276
0.874702
0.877144
1.17139
1.09806
1.09902
1.15976
1.16259
1.16416
0.968867
1.17095
1.18776
1.19596
1.2062
1.23504
1.24125
1.25193
1.05923
1.30786
1.2979
1.31807
1.3222
1.3516
1.13925
1.35735
1.35985
1.11711
1.36495
1.33513
1.36715
1.37272
1.35559
1.35888
1.3935
1.41273
1.37488
1.4325
1.43288
1.42423
1.45903
1.44607
1.19984
1.52909
1.51664
1.51301
1.51306
1.53556
1.50161
1.37539
1.62536
1.58713
1.65618
1.71031
1.69091
1.50226
1.76175
1.69793
1.51921
1.73544
1.79895
1.52121
1.74686
1.6468
1.80084
1.53603
1.68944
1.54818
1.72516
1.57569
1.55281
1.89812
1.55962
1.77421
1.79455
1.97276
1.95613
1.8301
1.95741
1.84078
1.84617
1.665
2.0075
1.70762
2.05875
2.05842
1.74735
1.96873
1.99247
2.09951
2.0023
1.75503
1.72998
2.02207
1.75669
2.14542
2.06929
2.07663
1.7925
1.81457
2.14696
1.87369
1.87305
2.19742
1.92422
2.23374
2.26592
2.27228
2.28126
2.29505
2.34284
2.31242
2.35275
2.30823
2.33207
2.36833
2.3726
2.33762
2.33415
2.03886
2.36034
2.3562
2.37654
2.37416
2.44778
2.13135
2.48723
2.43763
2.49888
2.4742
2.19227
2.50597
2.61902
2.56748
2.65549
2.64169
2.62331
2.63298
2.67511
2.2493
2.71385
2.65316
2.25395
2.25567
2.69995
2.74556
2.75165
2.31314
2.31661
2.71049
2.78392
2.7838
2.75635
2.80854
2.37201
2.74881
2.74668
2.80051
2.38626
2.78148
2.75677
2.41932
2.78589
2.89536
2.89473
2.89487
2.86655
2.86946
2.85817
2.49974
2.9159
2.92741
2.56887
2.91462
2.57417
2.92274
2.94793
2.94665
2.98512
2.98315
2.99794
3.03749
3.00791
3.03153
3.02985
2.71162
2.69462
3.00163
3.10736
3.07656
2.74716
3.09344
3.04819
3.09137
3.14493
3.07999
3.05115
3.17651
3.16216
3.04601
3.02702
3.17465
3.0505
2.84569
2.8594
2.88072
2.85867
3.23978
3.10044
3.23787
3.10316
3.24347
3.24579
2.90117
3.25379
2.90392
3.24845
2.91751
3.27795
3.27147
3.28639
3.30202
3.156
3.21555
3.14424
3.08094
3.17149
3.43381
3.16543
3.18928
3.21175
3.58085
3.60914
3.57349
3.64201
3.33417
3.33366
3.32497
3.6631
3.32656
3.33162
3.67108
3.42775
3.7757
3.54462
3.78397
3.78634
3.48496
3.5019
3.84368
3.6375
3.78431
3.52613
3.5624
3.72811
3.58855
3.73886
3.94227
3.75991
3.95294
3.95495
3.80477
3.67867
3.67424
3.98643
3.97641
3.80946
3.68348
4.0008
3.94418
4.01057
4.01298
3.99344
3.99487
3.97487
3.85988
3.91167
3.92874
3.78213
3.89159
3.78858
3.78397
3.75735
3.99399
4.01645
4.04678
4.05598
4.06046
3.85381
4.10193
4.11135
4.06307
4.14146
4.155
4.16864
4.21184
4.15412
4.23857
4.24633
4.02856
4.24916
4.19871
4.19815
4.28346
4.18926
4.28968
4.32131
4.3458
4.11765
4.35838
4.25225
4.23726
4.14087
4.14639
4.14499
4.40631
4.25502
4.14301
4.17004
4.17593
4.42928
4.35124
4.48271
4.22123
4.34622
4.23139
4.47097
4.34347
4.31922
4.48106
4.26083
4.22639
4.2457
4.5298
4.37699
4.53537
4.38191
4.26126
4.55102
4.6001
4.42084
4.62567
4.63269
4.4604
4.46137
4.61797
4.48272
4.64636
4.3848
4.71045
4.68607
4.41879
4.71011
4.74876
4.60273
4.60451
4.75752
4.49673
4.77306
4.78335
4.78371
4.83057
4.56646
4.75105
4.89211
4.90812
4.62727
4.63075
4.79054
4.65485
4.81605
4.92651
4.7039
4.85212
4.85065
4.82462
4.81643
4.75573
5.01163
5.0202
4.85698
5.06753
5.08789
5.08373
5.07272
5.08533
4.88564
4.90785
4.99208
4.99302
5.15951
4.96353
5.20574
5.19568
5.19744
4.99909
5.22393
5.08972
5.20838
5.1087
5.10614
5.2459
5.0274
5.1189
5.26181
5.10782
5.26857
5.05458
5.27011
5.13436
5.27845
5.25562
5.23472
5.11495
5.2455
5.23309
5.19168
5.1774
5.15411
5.19694
5.19465
5.28725
5.2369
5.18294
5.42532
5.30476
5.257
5.4297
5.24334
5.32096
5.4555
5.24779
5.4918
5.28886
5.26074
5.37351
5.26833
5.27214
5.51771
5.51573
5.40409
5.36858
5.44344
5.32486
5.34989
5.62514
5.63488
5.47076
5.42219
5.66834
5.48063
5.55812
5.57607
5.48304
5.54601
5.56191
5.59001
5.66242
5.81879
5.58297
5.63814
5.5992
5.63178
5.65051
5.7325
5.64756
5.91764
5.90707
5.75938
5.75412
5.67673
5.76622
5.68401
5.7757
5.71806
5.77059
5.73385
5.78124
5.81077
5.83457
6.03459
5.83627
5.86484
5.89904
5.84861
5.89356
5.89162
5.86986
6.1066
5.92245
6.10365
6.08952
6.09845
5.98315
6.14117
6.12694
6.02141
6.01456
6.01164
6.15149
6.20355
6.21008
6.04014
6.1015
6.24743
6.2499
6.13928
6.14012
6.14544
6.17789
6.13623
6.21252
6.21995
6.22539
6.26805
6.24293
6.26596
6.43132
6.29645
6.25259
6.44407
6.25644
6.18272
6.46557
6.46762
6.19311
6.49904
6.48253
6.24687
6.4928
6.43414
# Vergleich der Leistungsfähigkeit eines Einzelservers gegenüber vier Servern in einer Simulationsumgebung
## Abstract
In diesem Paper wird die Leistungsfähigkeit eines einzelnen Servers mit einer durchschnittlichen Bearbeitungszeit von 30 ms im Vergleich zu vier Servern mit jeweils einer durchschnittlichen Bearbeitungszeit von 50 ms untersucht. Die Hypothese lautet, dass vier Server mit längerer Bearbeitungszeit (50 ms) besser abschneiden als ein Server mit kürzerer Bearbeitungszeit (30 ms). Durch die Simulation wird analysiert, wie sich die Verteilung der Anfragen und die Gesamteffizienz des Systems unterscheiden. Die Ergebnisse liefern wertvolle Erkenntnisse für die Optimierung von Serverarchitekturen in verschiedenen Anwendungsszenarien.
## Einleitung
### Motivation und Hintergrund
Die Leistungsfähigkeit von Serverarchitekturen ist ein zentrales Thema in der Informatik und Betriebswirtschaft. Unternehmen stehen oft vor der Entscheidung, ob sie in einen leistungsstarken Einzelserver oder in mehrere weniger leistungsfähige Server investieren sollen. Diese Entscheidung hat nicht nur Auswirkungen auf die Systemleistung, sondern auch auf die Betriebskosten und die Skalierbarkeit.
### Problemstellung
Dieses Paper untersucht die Frage, ob vier Server mit einer durchschnittlichen Bearbeitungszeit von 50 ms besser abschneiden als ein einzelner Server mit einer Bearbeitungszeit von 30 ms. Dabei wird die Hypothese getestet, dass mehrere weniger leistungsfähige Server insgesamt effizienter arbeiten als ein leistungsstarker Einzelserver.
### Ziel des Papers
Das Ziel dieses Papers ist es, die Leistungsfähigkeit beider Serverkonfigurationen anhand von Simulationen zu vergleichen und die Ergebnisse zu interpretieren, um Unternehmen eine fundierte Entscheidungsgrundlage zu bieten.
## Methodik
### Simulationsumgebung
Die Simulation wurde in einer kontrollierten Umgebung durchgeführt, wobei die Anfragen gleichmäßig auf die Server verteilt wurden. Die Wartezeiten wurden aufgezeichnet und analysiert.
### Serverkonfigurationen
- **Einzelserver:** Durchschnittliche Bearbeitungszeit: 30 ms
- **Vier Server:** Durchschnittliche Bearbeitungszeit: 50 ms
### Annahmen und Vereinfachungen
Es wurde angenommen, dass alle Anfragen unabhängig voneinander sind und die Ankunftsrate der Anfragen konstant bleibt. Komplexere Faktoren wie Netzwerküberlastung und Serverausfälle wurden in dieser Simulation nicht berücksichtigt.
### Durchführung der Simulation
Die Simulation wurde für beide Konfigurationen durchgeführt, und die Wartezeiten wurden in einem Histogramm dargestellt.
## Ergebnisse
### Einzelserver (30 ms)
![Einzelserver](./plot/plot.png)
- **Mean waiting time:** 13.64434 seconds
- **Median waiting time:** 13.36815 seconds
- **Standard deviation of waiting time:** 7.95362 seconds
### Vier Server (4 x 50 ms)
![Vier Server](./plot/plot1.png)
- **Mean waiting time:** 4.34770 seconds
- **Median waiting time:** 4.10945 seconds
- **Standard deviation of waiting time:** 2.72114 seconds
## Diskussion
### Interpretation der Ergebnisse
Die Simulationsergebnisse zeigen, dass die Wartezeiten bei der Konfiguration mit vier Servern deutlich geringer sind als bei einem Einzelserver. Dies unterstützt die Hypothese, dass mehrere Server mit längerer Bearbeitungszeit effizienter arbeiten können als ein leistungsstarker Einzelserver.
### Vorteile des Mehrserver-Setups
- **Reduzierte Wartezeiten:** Die meisten Anfragen werden schneller bearbeitet.
- **Bessere Skalierbarkeit:** Mehrere Server können mehr Anfragen parallel verarbeiten.
- **Fehlertoleranz:** Ein Serverausfall hat weniger Auswirkungen auf das Gesamtsystem.
### Nachteile des Einzelserver-Setups
- **Längere Wartezeiten:** Gleichmäßige Verteilung der Wartezeiten zeigt potenzielle Engpässe.
- **Keine Parallelität:** Ein einzelner Server kann nur eine begrenzte Anzahl von Anfragen gleichzeitig bearbeiten.
### Auswirkungen auf die Praxis
Ein Mehrserver-Setup ist besonders vorteilhaft in Szenarien mit hohen Anfragevolumina und der Notwendigkeit schneller Bearbeitungszeiten. Ein Einzelserver-Setup könnte ausreichend sein für Systeme mit niedrigem Anfragevolumen oder in Szenarien, in denen die Einfachheit und Kosteneffizienz wichtiger sind als die absolute Leistungsfähigkeit.
## Fazit und Ausblick
Die Simulationsergebnisse zeigen deutlich, dass ein Mehrserver-Setup (vier Server) in den meisten Fällen kürzere Wartezeiten bietet und besser für Umgebungen mit hohen Anfragevolumina geeignet ist. Das Einzelserver-Setup führt zu gleichmäßig verteilten, aber insgesamt längeren Wartezeiten, was auf mögliche Engpässe bei hoher Last hinweist. Zukünftige Arbeiten könnten sich auf die Optimierung der Lastverteilung und die Untersuchung von Hybridansätzen konzentrieren, um die Effizienz weiter zu verbessern.
plot/plot.png

19 KiB

plot/plot1.png

19.5 KiB

import matplotlib.pyplot as plt
import numpy as np
# Function to read waiting times from a file
def read_waiting_times(filename):
with open(filename, 'r') as file:
waiting_times = [float(line.strip()) for line in file]
return waiting_times
# Read waiting times from the file
filename = '../logs/log_1server_30ms_bearbeitungszeit.txt'
waiting_times = read_waiting_times(filename)
# Plotting the histogram
plt.figure(figsize=(10, 6))
plt.hist(waiting_times, bins=10, edgecolor='black')
plt.title('Distribution of Waiting Times')
plt.xlabel('Waiting Time (seconds)')
plt.ylabel('Frequency')
# Display the plot
plt.savefig('plot.png')
# Display basic statistics
mean_waiting_time = np.mean(waiting_times)
median_waiting_time = np.median(waiting_times)
std_waiting_time = np.std(waiting_times)
print(f'Mean waiting time: {mean_waiting_time:.5f} seconds')
print(f'Median waiting time: {median_waiting_time:.5f} seconds')
print(f'Standard deviation of waiting time: {std_waiting_time:.5f} seconds')
\ No newline at end of file
#include <iostream>
#include <boost/asio.hpp>
#include <thread>
#include <chrono>
#include <random>
using boost::asio::ip::tcp;
void handle_request(tcp::socket socket) {
try {
std::random_device rd;
std::default_random_engine generator(rd());
std::exponential_distribution<> dist(1.0 / 50.0);
double wait_time_ms = dist(generator);
std::this_thread::sleep_for(std::chrono::milliseconds(static_cast<int>(wait_time_ms)));
std::string response = "hallo";
std::cout<<response<<std::endl ;
boost::asio::write(socket, boost::asio::buffer(response, response.length()));
char data[512];
boost::system::error_code error;
size_t length = socket.read_some(boost::asio::buffer(data), error);
if (error == boost::asio::error::eof)
return;
else if (error)
throw boost::system::system_error(error);
} catch (std::exception& e) {
std::cerr << "Exception in thread: " << e.what() << "\n";
}
}
void server(boost::asio::io_context& io_context, short port) {
tcp::acceptor acceptor(io_context, tcp::endpoint(tcp::v4(), port));
while (true) {
tcp::socket socket(io_context);
acceptor.accept(socket);
handle_request(std::move(socket));
}
}
int main() {
try {
boost::asio::io_context io_context;
server(io_context, 12345);
} catch (std::exception& e) {
std::cerr << "Exception: " << e.what() << "\n";
}
return 0;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment