Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/optimization #98

Merged
merged 10 commits into from
Feb 7, 2024
Merged

Fix/optimization #98

merged 10 commits into from
Feb 7, 2024

Conversation

bakhterets
Copy link
Contributor

Added:
Caching (RedisCache or SimpleCache)

The follow routes are now cached:
 "/" "/index"
 "/incidents/<incident_id>"
 "/history"
 "/availability"

Debugging expanded:

  If the RedisCache is used, then the connection to the 
  redis server is checked before creating an app instance,
  if the check fails, then the app will use SimpleDimple

Benchmark test:

$ flask --debug run --host=0.0.0.0
$ ab -n 3000 -c 100 http://127.0.0.0:5000/

Benchmarking 127.0.0.0 (be patient)
Completed 300 requests
Completed 600 requests
Completed 900 requests
Completed 1200 requests
Completed 1500 requests
Completed 1800 requests
Completed 2100 requests
Completed 2400 requests
Completed 2700 requests
Completed 3000 requests
Finished 3000 requests

Server Software:        Werkzeug/3.0.1
Server Hostname:        127.0.0.0
Server Port:            5000

Document Path:          /
Document Length:        101946 bytes

Concurrency Level:      100
Time taken for tests:   4.010 seconds
Complete requests:      3000
Failed requests:        0
Total transferred:      306369000 bytes
HTML transferred:       305838000 bytes
Requests per second:    748.07 [#/sec] (mean)
Time per request:       133.678 [ms] (mean)
Time per request:       1.337 [ms] (mean, across all concurrent requests)
Transfer rate:          74604.17 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.5      0       4
Processing:    24  127  12.5    126     158
Waiting:        9  115  12.5    114     146
Total:         28  127  12.1    126     158

Percentage of the requests served within a certain time (ms)
  50%    126
  66%    132
  75%    135
  80%    136
  90%    139
  95%    141
  98%    143
  99%    144
 100%    158 (longest request)

caching and web_test updated

/incidents/<id> caching added;
500 code (wrong inc id) fixed

GitGuardian Security Checks fix

GitGuardian Security Checks "remove podman example"
@bakhterets bakhterets requested a review from gtema February 5, 2024 16:15
OlhaKashyrina
OlhaKashyrina previously approved these changes Feb 6, 2024
@bakhterets bakhterets removed the request for review from gtema February 6, 2024 10:05
a comment removed
return False


if (
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you move this condition above the method definition (def check_redis_connection...)?
this doesn't look good to be present between 2 method definitions

@vladimirvshivkov vladimirvshivkov added the gate Gate PR with Zuul label Feb 7, 2024
Copy link

otc-zuul bot commented Feb 7, 2024

Build succeeded.
https://zuul.otc-service.com/t/eco/buildset/37729ab116924b8e8d9360aec3114258

✔️ otc-tox-docs SUCCESS in 7m 11s
✔️ otc-tox-pep8 SUCCESS in 5m 58s
✔️ stackmon-status-dashboard-upload-image SUCCESS in 2m 58s

@otc-zuul otc-zuul bot merged commit fa3bf67 into main Feb 7, 2024
5 checks passed
@otc-zuul otc-zuul bot deleted the fix/optimization branch February 7, 2024 10:17
bakhterets added a commit to stackmon/otc-status-dashboard that referenced this pull request Feb 7, 2024
stackmon/status-dashboard#98
quay.io/stackmon/status-dashboard:change_98_latest
otc-zuul bot pushed a commit to stackmon/otc-status-dashboard that referenced this pull request Feb 7, 2024
Update Dockerfile

stackmon/status-dashboard#98 quay.io/stackmon/status-dashboard:change_98_latest

Reviewed-by: Olha Kashyrina
Reviewed-by: Vladimir Vshivkov
@bakhterets bakhterets self-assigned this Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gate Gate PR with Zuul
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants