Skip to content

Commit aa14cff

Browse files
Merge branch 'main' into sysadmin-note-http2
2 parents 7a32578 + b89ed70 commit aa14cff

File tree

4 files changed

+52
-3
lines changed

4 files changed

+52
-3
lines changed

_docs/developer/development_instructions/performance_testing.md

+16
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,20 @@ with your URL.
3535

3636
_NOTE: Only run this on a server that you have permission to do so on._
3737

38+
## SQL
39+
40+
#### Viewing Queries Executed by Submitty
41+
42+
When Submitty is in debug mode (enabled by default in a Vagrant VM), the footer of pages will have an additional `Show Page Details` link which shows all queries that were made on the database in the process of rendering the page.
43+
#### Running Queries
44+
45+
See the [Database Design page](/developer/software_and_system_design/database_design) for information about connecting to the Submitty database to run queries.
46+
47+
One way to run the query directly on the Submitty VM is to use the following command: `sudo su - postgres -c "psql -d submitty_f22_sample -XqAt -f explain.sql > analyze.json"` where `submitty_f22_sample` is replaced with the target database (see the [Database Design page](/developer/software_and_system_design/database_design) for info about the databases in Submitty), `explain.sql` is replaced with a text file that has your query in it, and `analyze.json` is the file that you want the query plan to be output to.
48+
49+
#### Query Plan Visualization
50+
51+
One method for profiling and visualizing queries is to use a query plan visualizer such as `https://explain.dalibo.com`.
52+
53+
For this site, you generate a query plan for your query by prefixing your query with `EXPLAIN (ANALYZE, COSTS, VERBOSE, BUFFERS, FORMAT JSON)`, running it and pasting the output into the site along with your query (without the EXPLAIN prefix). The site then provides a visualization of your query, showing details such as the time it takes for individual parts of the query to run.
3854

_docs/developer/rensselaer_center_for_open_source/moorthy.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Moorthy
33
category: Developer > Rensselaer Center for Open Source (RCOS)
44
redirect_from:
5-
- /developer/rcos_moorthy.md
5+
- /developer/rcos_moorthy
66
- /developer/rpi_summer_rcos
77
- /developer/rpi_summer_rcos/index
88
---

_docs/developer/testing/python_unit_tests.md

+27
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ The following Python modules of Submitty are unit tested:
77
* Migrator (under `migrations/` folder)
88
* Autograding (under `autograding/` folder)
99
* python_submitty_utils (under `python_submitty_utils/` folder)
10+
* submitty_jobs (under `sbin/submitty_daemon_jobs/` folder)
1011

1112
### Running Python Unit Tests
1213

@@ -43,6 +44,32 @@ python3 -m unittest tests.test_cli
4344
python3 -m unittest tests.test_cli.TestCli.test_no_args
4445
```
4546

47+
#### Submitty Daemon Jobs
48+
49+
Make sure the python system dependencies are locally installed, this can be done by running the following command at the root of the project structure.
50+
51+
```bash
52+
python3 -m pip install -r .setup/pip/system_requirements.txt
53+
54+
```
55+
56+
For the submitty_daemon_jobs unit tests, you will need to set the top level directory to `sbin/submitty_daemon_jobs` when running them. This can be done by the following command
57+
58+
```bash
59+
#in the sbin/submitty_daemon_jobs directory
60+
61+
python3 -m unittest discover tests -t .
62+
```
63+
64+
Or if you're using `coverage`
65+
66+
```bash
67+
#in the sbin/submitty_daemon_jobs directory
68+
69+
coverage run -m unittest discover tests -t .
70+
```
71+
72+
4673
### Writing Python Unit Tests
4774

4875
The [unittest](https://docs.python.org/3/library/unittest.html) documentation

_docs/sysadmin/installation/system_customization.md

+8-2
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,8 @@ However, this should be only applied to the `php.ini` running the web server and
143143

144144
## Increasing the max number of files that can be uploaded at once
145145

146-
By default, PHP only allows 20 files to be uploaded at a time. To change this limit, edit:
146+
By default, PHP only allows 20 files to be uploaded at a time.
147+
This limit is probably sufficient, but to change this limit, edit:
147148

148149
```
149150
/etc/php/7.4/fpm/php.ini
@@ -152,7 +153,8 @@ By default, PHP only allows 20 files to be uploaded at a time. To change this li
152153
and modify the variable:
153154

154155
```
155-
upload_max_filesize
156+
; Maximum number of files that can be uploaded via a single request
157+
max_file_uploads = 20
156158
```
157159

158160
Then restart PHP
@@ -182,6 +184,10 @@ post_max_size
182184
upload_max_filesize
183185
```
184186

187+
We have found that a value of `200M` for both variables has been
188+
appropriate, specifically for bulk uploading of scanned paper exams
189+
for online grading.
190+
185191
And restart apache:
186192

187193
```

0 commit comments

Comments
 (0)