12. Best Practices
Activity 12.01: Viewing the Resources Used by the Panoramic Trekking App
Solution:
There are a number of ways in which we perform the first activity in this chapter. The following steps are one way to do this by using the docker stats
command to view the resources being used by a service in the Panoramic Trekking App. For this example, we are going to use the postgresql-app
service, which is running as part of the Panoramic Trekking App:
- Create a script that will create a new table and fill it with random values. The following script does exactly what we want in this situation as we want to create a long processing query and see how it affects the resources on our container. Add in the following details and save the file as
resource_test.sql
using your favorite editor:1 CREATE TABLE test_data 2 ( 3 random_value NUMERIC NOT NULL, 4 row1 NUMERIC NOT NULL, 5 &...