iwashi623 / isucon13-20240709

0 stars 0 forks source link

二日目 #2

Open iwashi623 opened 3 months ago

iwashi623 commented 3 months ago

alp

+-------+-----+------+-----+-----+-----+--------+----------------------------------------------------------+-------+--------+---------+--------+--------+--------+--------+--------+-----------+------------+---------------+-----------+
| COUNT | 1XX | 2XX  | 3XX | 4XX | 5XX | METHOD |                           URI                            |  MIN  |  MAX   |   SUM   |  AVG   |  P90   |  P95   |  P99   | STDDEV | MIN(BODY) | MAX(BODY)  |   SUM(BODY)   | AVG(BODY) |
+-------+-----+------+-----+-----+-----+--------+----------------------------------------------------------+-------+--------+---------+--------+--------+--------+--------+--------+-----------+------------+---------------+-----------+
| 8585  | 0   | 8582 | 0   | 3   | 0   | GET    | /api/user/[-0-9a-zA-Z]+                                  | 0.004 | 9.644  | 180.548 | 0.021  | 0.012  | 0.016  | 0.020  | 0.336  | 0.000     | 164850.000 | 484575469.000 | 56444.434 |
| 971   | 0   | 969  | 0   | 2   | 0   | GET    | /api/livestream/[-0-9a-zA-Z]+/livecomment                | 0.004 | 0.732  | 142.692 | 0.147  | 0.348  | 0.452  | 0.640  | 0.143  | 0.000     | 81757.000  | 16147505.000  | 16629.768 |
| 1006  | 0   | 1003 | 0   | 3   | 0   | GET    | /api/livestream/[-0-9a-zA-Z]+/reaction                   | 0.004 | 0.844  | 137.080 | 0.136  | 0.320  | 0.448  | 0.604  | 0.141  | 0.000     | 76911.000  | 15038245.000  | 14948.554 |
| 37    | 0   | 35   | 0   | 2   | 0   | POST   | /api/livestream/[-0-9a-zA-Z]+/moderate                   | 0.172 | 6.468  | 109.252 | 2.953  | 5.468  | 6.252  | 6.468  | 1.303  | 0.000     | 23.000     | 805.000       | 21.757    |
| 144   | 0   | 144  | 0   | 0   | 0   | GET    | /api/livestream/search                                   | 0.040 | 1.344  | 85.324  | 0.593  | 0.800  | 1.088  | 1.296  | 0.240  | 49418.000 | 148134.000 | 10158137.000  | 70542.618 |
| 5     | 0   | 2    | 0   | 3   | 0   | GET    | /api/livestream/[-0-9a-zA-Z]+/statistics                 | 2.456 | 20.004 | 64.944  | 12.989 | 20.004 | 20.004 | 20.004 | 8.589  | 0.000     | 102.000    | 202.000       | 40.400    |
| 493   | 0   | 489  | 0   | 4   | 0   | POST   | /api/livestream/reservation                              | 0.024 | 0.216  | 47.928  | 0.097  | 0.128  | 0.144  | 0.188  | 0.032  | 0.000     | 1478.000   | 573046.000    | 1162.365  |
| 2569  | 0   | 2394 | 0   | 1   | 174 | POST   | /api/icon                                                | 0.004 | 0.120  | 38.536  | 0.015  | 0.024  | 0.028  | 0.040  | 0.007  | 0.000     | 154.000    | 66455.000     | 25.868    |
| 2533  | 0   | 2530 | 0   | 2   | 1   | POST   | /api/register                                            | 0.000 | 0.148  | 28.832  | 0.011  | 0.016  | 0.020  | 0.024  | 0.008  | 0.000     | 522.000    | 1189342.000   | 469.539   |
| 947   | 0   | 946  | 0   | 1   | 0   | POST   | /api/livestream/[-0-9a-zA-Z]+/livecomment                | 0.004 | 0.124  | 22.420  | 0.024  | 0.036  | 0.040  | 0.048  | 0.010  | 87.000    | 2128.000   | 1822060.000   | 1924.034  |
| 899   | 0   | 899  | 0   | 0   | 0   | POST   | /api/livestream/[-0-9a-zA-Z]+/reaction                   | 0.004 | 0.124  | 18.988  | 0.021  | 0.032  | 0.036  | 0.044  | 0.010  | 1552.000  | 2221.000   | 1662959.000   | 1849.788  |
| 2538  | 0   | 2536 | 0   | 2   | 0   | POST   | /api/login                                               | 0.004 | 0.024  | 17.924  | 0.007  | 0.012  | 0.012  | 0.016  | 0.003  | 0.000     | 64.000     | 128.000       | 0.050     |
| 481   | 0   | 481  | 0   | 0   | 0   | GET    | /api/tag                                                 | 0.004 | 0.028  | 3.000   | 0.006  | 0.012  | 0.012  | 0.016  | 0.004  | 6089.000  | 6089.000   | 2928809.000   | 6089.000  |
| 222   | 0   | 222  | 0   | 0   | 0   | GET    | /api/livestream                                          | 0.020 | 0.048  | 2.352   | 0.011  | 0.024  | 0.028  | 0.040  | 0.009  | 3.000     | 22469.000  | 217520.000    | 979.820   |
| 1     | 0   | 1    | 0   | 0   | 0   | POST   | /api/initialize                                          | 1.980 | 1.980  | 1.980   | 1.980  | 1.980  | 1.980  | 1.980  | 0.000  | 27.000    | 27.000     | 27.000        | 27.000    |
| 60    | 0   | 60   | 0   | 0   | 0   | POST   | /api/livestream/[-0-9a-zA-Z]+/livecomment/[-0-9]+/report | 0.004 | 0.052  | 1.856   | 0.031  | 0.040  | 0.048  | 0.052  | 0.010  | 2297.000  | 2695.000   | 155823.000    | 2597.050  |
| 177   | 0   | 177  | 0   | 0   | 0   | GET    | /api/livestream/[-0-9a-zA-Z]+/report                     | 0.000 | 0.116  | 1.488   | 0.008  | 0.016  | 0.020  | 0.080  | 0.012  | 3.000     | 10885.000  | 44401.000     | 250.853   |
| 106   | 0   | 106  | 0   | 0   | 0   | GET    | /api/livestream/[-0-9a-zA-Z]+/ngwords                    | 0.004 | 0.020  | 0.548   | 0.005  | 0.008  | 0.012  | 0.016  | 0.004  | 5.000     | 137.000    | 1160.000      | 10.943    |
| 88    | 0   | 88   | 0   | 0   | 0   | POST   | /api/livestream/[-0-9a-zA-Z]+/enter                      | 0.004 | 0.020  | 0.480   | 0.005  | 0.008  | 0.012  | 0.020  | 0.003  | 0.000     | 0.000      | 0.000         | 0.000     |
| 80    | 0   | 80   | 0   | 0   | 0   | DELETE | /api/livestream/[-0-9a-zA-Z]+/exit                       | 0.004 | 0.012  | 0.384   | 0.005  | 0.008  | 0.008  | 0.012  | 0.003  | 0.000     | 0.000      | 0.000         | 0.000     |
| 15    | 0   | 15   | 0   | 0   | 0   | GET    | /api/user/[-0-9a-zA-Z]+/theme                            | 0.004 | 0.012  | 0.080   | 0.005  | 0.008  | 0.012  | 0.012  | 0.003  | 38.000    | 38.000     | 570.000       | 38.000    |
| 1     | 0   | 1    | 0   | 0   | 0   | GET    | /api/livestream/7497                                     | 0.004 | 0.004  | 0.004   | 0.004  | 0.004  | 0.004  | 0.004  | 0.000  | 1478.000  | 1478.000   | 1478.000      | 1478.000  |
| 1     | 0   | 1    | 0   | 0   | 0   | GET    | /api/payment                                             | 0.004 | 0.004  | 0.004   | 0.004  | 0.004  | 0.004  | 0.004  | 0.000  | 21.000    | 21.000     | 21.000        | 21.000    |
| 3     | 0   | 3    | 0   | 0   | 0   | GET    | /api/user/me                                             | 0.000 | 0.000  | 0.000   | 0.000  | 0.000  | 0.000  | 0.000  | 0.000  | 235.000   | 247.000    | 729.000       | 243.000   |
+-------+-----+------+-----+-----+-----+--------+----------------------------------------------------------+-------+--------+---------+--------+--------+--------+--------+--------+-----------+------------+---------------+-----------+
mv ~/pt.log ~/pt20240710124606 2>/dev/null || true
sudo pt-query-digest /var/log/mysql/slow.log >> ~/pt.log
cat ~/pt.log

# 48.5s user time, 70ms system time, 29.25M rss, 35.18M vsz
# Current date: Wed Jul 10 12:46:55 2024
# Hostname: ip-192-168-0-13
# Files: /var/log/mysql/slow.log
# Overall: 778.15k total, 26 unique, 953.61 QPS, 0.06x concurrency _______
# Time range: 2024-07-10T12:30:27 to 2024-07-10T12:44:03
# Attribute          total     min     max     avg     95%  stddev  median
# ============     ======= ======= ======= ======= ======= ======= =======
# Exec time            49s     1us    30ms    63us   125us    73us    84us
# Lock time          504ms       0   430us       0     1us     1us     1us
# Rows sent          6.78k       0   1.25k    0.01       0    2.89       0
# Rows examine      10.47k       0   3.69k    0.01       0    5.17       0
# Query size        61.73M       5     896   83.18  151.03   47.54  112.70

# Profile
# Rank Query ID                     Response time Calls  R/Call V/M   Item
# ==== ============================ ============= ====== ====== ===== ====
#    1 0x22279D81D51006139E0C764... 28.7964 58.3% 274756 0.0001  0.00 SELECT domains domainmetadata
#    2 0x42EF7D7D98FBCC9723BF896...  8.3860 17.0%  72879 0.0001  0.00 SELECT records
#    3 0x3D83BC87F3B3A00D571FFC8...  7.5118 15.2%  70828 0.0001  0.00 SELECT records
#    4 0x8F7679D452333ED3C7D60D2...  4.0124  8.1% 355813 0.0000  0.00 ADMIN RESET STMT
# MISC 0xMISC                        0.6622  1.3%   3870 0.0002   0.0 <22 ITEMS>

# Query 1: 3.39k QPS, 0.36x concurrency, ID 0x22279D81D51006139E0C76405B54C261 at byte 687469
# This item is included in the report because it matches --limit.
# Scores: V/M = 0.00
# Time range: 2024-07-10T12:30:36 to 2024-07-10T12:31:57
# Attribute    pct   total     min     max     avg     95%  stddev  median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count         35  274756
# Exec time     58     29s    66us     2ms   104us   125us    16us   103us
# Lock time     68   345ms       0   430us     1us     1us     1us     1us
# Rows sent      0       0       0       0       0       0       0       0
# Rows examine   0       0       0       0       0       0       0       0
# Query size    47  29.61M     113     113     113     113       0     113
# String:
# Databases    isudns
# Hosts        ip-192-168-0-11.ap-northeast-1.compute.inter...
# Users        isudns
# Query_time distribution
#   1us
#  10us  ################################
# 100us  ################################################################
#   1ms  #
#  10ms
# 100ms
#    1s
#  10s+
# Tables
#    SHOW TABLE STATUS FROM `isudns` LIKE 'domains'\G
#    SHOW CREATE TABLE `isudns`.`domains`\G
#    SHOW TABLE STATUS FROM `isudns` LIKE 'domainmetadata'\G
#    SHOW CREATE TABLE `isudns`.`domainmetadata`\G
# EXPLAIN /*!50100 PARTITIONS*/
select kind,content from domains, domainmetadata where domainmetadata.domain_id=domains.id and name='t.isucon.pw'\G

# Query 2: 899.74 QPS, 0.10x concurrency, ID 0x42EF7D7D98FBCC9723BF896EBFC51D24 at byte 242738386
# This item is included in the report because it matches --limit.
# Scores: V/M = 0.00
# Time range: 2024-07-10T12:30:36 to 2024-07-10T12:31:57
# Attribute    pct   total     min     max     avg     95%  stddev  median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count          9   72879
# Exec time     16      8s    71us   454us   115us   138us    17us   113us
# Lock time     15    78ms       0   134us     1us     1us     1us     1us
# Rows sent      2     174       0       1    0.00       0    0.05       0
# Rows examine   1     174       0       1    0.00       0    0.05       0
# Query size    16  10.40M     128     219  149.59  158.58    8.52  143.84
# String:
# Databases    isudns
# Hosts        ip-192-168-0-11.ap-northeast-1.compute.inter...
# Users        isudns
# Query_time distribution
#   1us
#  10us  ##########
# 100us  ################################################################
#   1ms
#  10ms
# 100ms
#    1s
#  10s+
# Tables
#    SHOW TABLE STATUS FROM `isudns` LIKE 'records'\G
#    SHOW CREATE TABLE `isudns`.`records`\G
# EXPLAIN /*!50100 PARTITIONS*/
SELECT content,ttl,prio,type,domain_id,disabled,name,auth FROM records WHERE disabled=0 and name='*.52yguzu3prs47w524t5lgnhforc60.t.isucon.pw' and domain_id=1\G

# Query 3: 874.42 QPS, 0.09x concurrency, ID 0x3D83BC87F3B3A00D571FFC8104A6E50C at byte 4524
# This item is included in the report because it matches --limit.
# Scores: V/M = 0.00
# Time range: 2024-07-10T12:30:36 to 2024-07-10T12:31:57
# Attribute    pct   total     min     max     avg     95%  stddev  median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count          9   70828
# Exec time     15      8s    65us     1ms   106us   125us    16us   103us
# Lock time     15    77ms       0   218us     1us     1us     1us     1us
# Rows sent      0       2       0       1    0.00       0    0.01       0
# Rows examine   0       2       0       1    0.00       0    0.01       0
# Query size    16  10.02M     125     218  148.34  151.03    7.83  143.84
# String:
# Databases    isudns
# Hosts        ip-192-168... (70827/99%), localhost (1/0%)
# Users        isudns
# Query_time distribution
#   1us
#  10us  ##########################
# 100us  ################################################################
#   1ms  #
#  10ms
# 100ms
#    1s
#  10s+
# Tables
#    SHOW TABLE STATUS FROM `isudns` LIKE 'records'\G
#    SHOW CREATE TABLE `isudns`.`records`\G
# EXPLAIN /*!50100 PARTITIONS*/
SELECT content,ttl,prio,type,domain_id,disabled,name,auth FROM records WHERE disabled=0 and type='SOA' and name='t.isucon.pw'\G

# Query 4: 4.39k QPS, 0.05x concurrency, ID 0x8F7679D452333ED3C7D60D22131CEFD4 at byte 104158163
# This item is included in the report because it matches --limit.
# Scores: V/M = 0.00
# Time range: 2024-07-10T12:30:36 to 2024-07-10T12:31:57
# Attribute    pct   total     min     max     avg     95%  stddev  median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count         45  355813
# Exec time      8      4s     5us   364us    11us    18us     4us    10us
# Lock time      0       0       0       0       0       0       0       0
# Rows sent      0       0       0       0       0       0       0       0
# Rows examine   0       0       0       0       0       0       0       0
# Query size    18  11.20M      33      33      33      33       0      33
# String:
# Databases    isudns
# Hosts        ip-192-168... (354869/99%), localhost (944/0%)
# Users        isudns
# Query_time distribution
#   1us  #######################
#  10us  ################################################################
# 100us  #
#   1ms
#  10ms
# 100ms
#    1s
#  10s+
administrator command: Reset stmt\G
# 46.6s user time, 140ms system time, 37.18M rss, 43.67M vsz
# Current date: Wed Jul 10 12:47:18 2024
# Hostname: ip-192-168-0-12
# Files: /var/log/mysql/slow.log
# Overall: 580.53k total, 85 unique, 6.11k QPS, 1.82x concurrency ________
# Time range: 2024-07-10T12:30:22 to 2024-07-10T12:31:57
# Attribute          total     min     max     avg     95%  stddev  median
# ============     ======= ======= ======= ======= ======= ======= =======
# Exec time           173s     1us   280ms   297us   725us     2ms   103us
# Lock time             2s       0    53ms     2us     1us   122us     1us
# Rows sent        729.82k       0   7.63k    1.29    0.99   27.59    0.99
# Rows examine      18.65M       0  14.04k   33.69    7.70  418.06    0.99
# Query size       226.67M       6   1.94M  409.43  329.68   5.36k   42.48

# Profile
# Rank Query ID                     Response time Calls  R/Call V/M   Item
# ==== ============================ ============= ====== ====== ===== ====
#    1 0xF1B8EF06D6CA63B24BFF433... 30.7743 17.8%  25252 0.0012  0.02 SELECT users livestreams livecomments
#    2 0x84B457C910C4A79FC9EBECB... 20.0512 11.6%  55403 0.0004  0.01 SELECT icons
#    3 0x4ADE2DC90689F1C4891749A... 18.6376 10.8%  61300 0.0003  0.00 DELETE SELECT livecomments
#    4 0xDB74D52D39A7090F224C4DE... 14.1102  8.2%  25253 0.0006  0.00 SELECT users livestreams reactions
#    5 0xFBC5564AE716EAE82F20BFB... 12.8762  7.5% 122399 0.0001  0.00 SELECT tags
#    6 0x187ACCBFD599177B40EA63D... 11.5878  6.7%   2569 0.0045  0.01 INSERT icons
#    7 0xA3401CA3ABCC04C3AB221DB... 11.5144  6.7%    489 0.0235  0.01 UPDATE reservation_slots
#    8 0x7F9C0C0BA9473953B723EE1...  8.4729  4.9%    491 0.0173  0.00 SELECT reservation_slots
#    9 0x38BC86A45F31C6B1EE32467...  6.9087  4.0%  46862 0.0001  0.00 SELECT themes
#   10 0xFD38427AE3D09E3883A680F...  6.3252  3.7%  32221 0.0002  0.00 SELECT livestreams livecomments
#   11 0xC499D81D570D361DB61FC43...  5.7983  3.4%  32223 0.0002  0.00 SELECT livestreams reactions
#   12 0xEA1E6309EEEFF9A6831AD2F...  5.2795  3.1%  44317 0.0001  0.00 SELECT users
#   13 0xF7144185D9A142A426A36DC...  4.7461  2.8%  26772 0.0002  0.00 SELECT livestream_tags
#   14 0xFFFCA4D67EA0A788813031B...  3.0512  1.8%  13195 0.0002  0.04 COMMIT
#   15 0xD6032FE08E1FE706A928B8B...  2.6091  1.5%  21213 0.0001  0.00 SELECT livestreams
#   16 0x59F1B6DD8D9FEC059E55B3B...  1.5238  0.9%   4842 0.0003  0.00 SELECT reservation_slots
# MISC 0xMISC                        8.2701  4.8%  65732 0.0001   0.0 <69 ITEMS>

# Query 1: 311.75 QPS, 0.38x concurrency, ID 0xF1B8EF06D6CA63B24BFF433E06CCEB22 at byte 48314585
# This item is included in the report because it matches --limit.
# Scores: V/M = 0.02
# Time range: 2024-07-10T12:30:36 to 2024-07-10T12:31:57
# Attribute    pct   total     min     max     avg     95%  stddev  median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count          4   25252
# Exec time     17     31s   109us    72ms     1ms     2ms     5ms   194us
# Lock time      4    64ms       0     2ms     2us     1us    35us     1us
# Rows sent      3  24.66k       1       1       1       1       0       1
# Rows examine  26   5.02M       0   2.22k  208.27   1.96k  595.04    7.70
# Query size     1   3.98M     163     166  165.30  158.58       0  158.58
# String:
# Databases    isupipe
# Hosts        ip-192-168-0-11.ap-northeast-1.compute.inter...
# Users        isucon
# Query_time distribution
#   1us
#  10us
# 100us  ################################################################
#   1ms  #############
#  10ms  #
# 100ms
#    1s
#  10s+
# Tables
#    SHOW TABLE STATUS FROM `isupipe` LIKE 'users'\G
#    SHOW CREATE TABLE `isupipe`.`users`\G
#    SHOW TABLE STATUS FROM `isupipe` LIKE 'livestreams'\G
#    SHOW CREATE TABLE `isupipe`.`livestreams`\G
#    SHOW TABLE STATUS FROM `isupipe` LIKE 'livecomments'\G
#    SHOW CREATE TABLE `isupipe`.`livecomments`\G
# EXPLAIN /*!50100 PARTITIONS*/
SELECT IFNULL(SUM(l2.tip), 0) FROM users u
                INNER JOIN livestreams l ON l.user_id = u.id
                INNER JOIN livecomments l2 ON l2.livestream_id = l.id
                WHERE u.id = 43\G

# Query 2: 683.99 QPS, 0.25x concurrency, ID 0x84B457C910C4A79FC9EBECB8B1065C66 at byte 201213798
# This item is included in the report because it matches --limit.
# Scores: V/M = 0.01
# Time range: 2024-07-10T12:30:36 to 2024-07-10T12:31:57
# Attribute    pct   total     min     max     avg     95%  stddev  median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count          9   55403
# Exec time     11     20s    55us   107ms   361us   657us     2ms   176us
# Lock time      3    63ms       0     5ms     1us     1us    25us     1us
# Rows sent      6  47.17k       0       1    0.87    0.99    0.33    0.99
# Rows examine   0  47.17k       0       1    0.87    0.99    0.33    0.99
# Query size     1   2.32M      41      44   43.91   42.48    0.19   42.48
# String:
# Databases    isupipe
# Hosts        ip-192-168-0-11.ap-northeast-1.compute.inter...
# Users        isucon
# Query_time distribution
#   1us
#  10us  ####
# 100us  ################################################################
#   1ms  ##
#  10ms  #
# 100ms  #
#    1s
#  10s+
# Tables
#    SHOW TABLE STATUS FROM `isupipe` LIKE 'icons'\G
#    SHOW CREATE TABLE `isupipe`.`icons`\G
# EXPLAIN /*!50100 PARTITIONS*/
SELECT image FROM icons WHERE user_id = 1013\G

# Query 3: 1.02k QPS, 0.31x concurrency, ID 0x4ADE2DC90689F1C4891749AF54FB8D14 at byte 81395547
# This item is included in the report because it matches --limit.
# Scores: V/M = 0.00
# Time range: 2024-07-10T12:30:57 to 2024-07-10T12:31:57
# Attribute    pct   total     min     max     avg     95%  stddev  median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count         10   61300
# Exec time     10     19s    81us    14ms   304us     1ms   547us   144us
# Lock time      6   103ms       0     6ms     1us     1us    37us     1us
# Rows sent      0       0       0       0       0       0       0       0
# Rows examine   0 119.73k       2       4    2.00    1.96    0.01    1.96
# Query size     8  19.32M     263     529  330.48  363.48   27.95  313.99
# String:
# Databases    isupipe
# Hosts        ip-192-168-0-11.ap-northeast-1.compute.inter...
# Users        isucon
# Query_time distribution
#   1us
#  10us  #
# 100us  ################################################################
#   1ms  ####
#  10ms  #
# 100ms
#    1s
#  10s+
# Tables
#    SHOW TABLE STATUS FROM `isupipe` LIKE 'livecomments'\G
#    SHOW CREATE TABLE `isupipe`.`livecomments`\G
DELETE FROM livecomments
                        WHERE
                        id = 2 AND
                        livestream_id = 7552 AND
                        (SELECT COUNT(*)
                        FROM
                        (SELECT 'これからも素敵な時間を共有してほしい。' AS text) AS texts
                        INNER JOIN
                        (SELECT CONCAT('%', '夢耕', '%')        AS pattern) AS patterns
                        ON texts.text LIKE patterns.pattern) >= 1\G
# Converted for EXPLAIN
# EXPLAIN /*!50100 PARTITIONS*/
select * from  livecomments
                        WHERE
                        id = 2 AND
                        livestream_id = 7552 AND
                        (SELECT COUNT(*)
                        FROM
                        (SELECT 'これからも素敵な時間を共有してほしい。' AS text) AS texts
                        INNER JOIN
                        (SELECT CONCAT('%', '夢耕', '%')        AS pattern) AS patterns
                        ON texts.text LIKE patterns.pattern) >= 1\G

# Query 4: 311.77 QPS, 0.17x concurrency, ID 0xDB74D52D39A7090F224C4DEEAF3028C9 at byte 60932856
# This item is included in the report because it matches --limit.
# Scores: V/M = 0.00
# Time range: 2024-07-10T12:30:36 to 2024-07-10T12:31:57
# Attribute    pct   total     min     max     avg     95%  stddev  median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count          4   25253
# Exec time      8     14s   105us    30ms   558us     2ms   898us   176us
# Lock time      3    63ms       0     7ms     2us     1us    64us     1us
# Rows sent      3  24.66k       1       1       1       1       0       1
# Rows examine  21   3.94M       0   1.96k  163.63   1.86k  527.05    7.70
# Query size     1   3.50M     143     146  145.30  143.84    0.52  143.84
# String:
# Databases    isupipe
# Hosts        ip-192-168-0-11.ap-northeast-1.compute.inter...
# Users        isucon
# Query_time distribution
#   1us
#  10us
# 100us  ################################################################
#   1ms  ############
#  10ms  #
# 100ms
#    1s
#  10s+
# Tables
#    SHOW TABLE STATUS FROM `isupipe` LIKE 'users'\G
#    SHOW CREATE TABLE `isupipe`.`users`\G
#    SHOW TABLE STATUS FROM `isupipe` LIKE 'livestreams'\G
#    SHOW CREATE TABLE `isupipe`.`livestreams`\G
#    SHOW TABLE STATUS FROM `isupipe` LIKE 'reactions'\G
#    SHOW CREATE TABLE `isupipe`.`reactions`\G
# EXPLAIN /*!50100 PARTITIONS*/
SELECT COUNT(*) FROM users u
                INNER JOIN livestreams l ON l.user_id = u.id
                INNER JOIN reactions r ON r.livestream_id = l.id
                WHERE u.id = 111\G

# Query 5: 1.85k QPS, 0.20x concurrency, ID 0xFBC5564AE716EAE82F20BFB45F6C37E7 at byte 160606056
# This item is included in the report because it matches --limit.
# Scores: V/M = 0.00
# Time range: 2024-07-10T12:30:51 to 2024-07-10T12:31:57
# Attribute    pct   total     min     max     avg     95%  stddev  median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count         21  122399
# Exec time      7     13s    41us    10ms   105us   167us   218us    73us
# Lock time      8   138ms       0     3ms     1us     1us    18us     1us
# Rows sent     16 119.53k       1       1       1       1       0       1
# Rows examine   0 119.53k       1       1       1       1       0       1
# Query size     1   3.73M      31      33   31.96   31.70    0.37   31.70
# String:
# Databases    isupipe
# Hosts        ip-192-168-0-11.ap-northeast-1.compute.inter...
# Users        isucon
# Query_time distribution
#   1us
#  10us  ################################################################
# 100us  ########
#   1ms  #
#  10ms
# 100ms
#    1s
#  10s+
# Tables
#    SHOW TABLE STATUS FROM `isupipe` LIKE 'tags'\G
#    SHOW CREATE TABLE `isupipe`.`tags`\G
# EXPLAIN /*!50100 PARTITIONS*/
SELECT * FROM tags WHERE id = 16\G

# Query 6: 39.52 QPS, 0.18x concurrency, ID 0x187ACCBFD599177B40EA63D86398DA11 at byte 201148603
# This item is included in the report because it matches --limit.
# Scores: V/M = 0.01
# Time range: 2024-07-10T12:30:52 to 2024-07-10T12:31:57
# Attribute    pct   total     min     max     avg     95%  stddev  median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count          0    2569
# Exec time      6     12s     1ms   111ms     5ms    14ms     5ms     3ms
# Lock time     54   877ms       0    53ms   341us     2ms     2ms     1us
# Rows sent      0       0       0       0       0       0       0       0
# Rows examine   0       0       0       0       0       0       0       0
# Query size    76 174.00M  38.98k 175.32k  69.36k  88.02k  16.57k  65.68k
# String:
# Databases    isupipe
# Hosts        ip-192-168-0-11.ap-northeast-1.compute.inter...
# Users        isucon
# Query_time distribution
#   1us
#  10us
# 100us
#   1ms  ################################################################
#  10ms  #####
# 100ms  #
#    1s
#  10s+
# Tables
#    SHOW TABLE STATUS FROM `isupipe` LIKE 'icons'\G
#    SHOW CREATE TABLE `isupipe`.`icons`\G
INSERT INTO icons (user_id, image) VALUES (1532,

# Query 7: 6.04 QPS, 0.14x concurrency, ID 0xA3401CA3ABCC04C3AB221DB8AD5CBF26 at byte 48316807
# This item is included in the report because it matches --limit.
# Scores: V/M = 0.01
# Time range: 2024-07-10T12:30:36 to 2024-07-10T12:31:57
# Attribute    pct   total     min     max     avg     95%  stddev  median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count          0     489
# Exec time      6     12s     5ms    94ms    24ms    48ms    14ms    20ms
# Lock time      0   486us       0    76us       0     1us     3us     1us
# Rows sent      0       0       0       0       0       0       0       0
# Rows examine  21   4.08M   8.55k   8.55k   8.55k   8.55k       0   8.55k
# Query size     0  46.80k      98      98      98      98       0      98
# String:
# Databases    isupipe
# Hosts        ip-192-168-0-11.ap-northeast-1.compute.inter...
# Users        isucon
# Query_time distribution
#   1us
#  10us
# 100us
#   1ms  #######
#  10ms  ################################################################
# 100ms
#    1s
#  10s+
# Tables
#    SHOW TABLE STATUS FROM `isupipe` LIKE 'reservation_slots'\G
#    SHOW CREATE TABLE `isupipe`.`reservation_slots`\G
UPDATE reservation_slots SET slot = slot - 1 WHERE start_at >= 1701180000 AND end_at <= 1701230400\G
# Converted for EXPLAIN
# EXPLAIN /*!50100 PARTITIONS*/
select  slot = slot - 1 from reservation_slots where  start_at >= 1701180000 AND end_at <= 1701230400\G

# Query 8: 6.06 QPS, 0.10x concurrency, ID 0x7F9C0C0BA9473953B723EE16C08655F1 at byte 46515930
# This item is included in the report because it matches --limit.
# Scores: V/M = 0.00
# Time range: 2024-07-10T12:30:36 to 2024-07-10T12:31:57
# Attribute    pct   total     min     max     avg     95%  stddev  median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count          0     491
# Exec time      4      8s     5ms    71ms    17ms    33ms     9ms    15ms
# Lock time      0   605us       0    42us     1us     1us     2us     1us
# Rows sent      0   4.74k       1      21    9.89   18.53    5.82    9.83
# Rows examine  21   4.10M   8.55k   8.55k   8.55k   8.55k       0   8.55k
# Query size     0  46.03k      96      96      96      96       0      96
# String:
# Databases    isupipe
# Hosts        ip-192-168-0-11.ap-northeast-1.compute.inter...
# Users        isucon
# Query_time distribution
#   1us
#  10us
# 100us
#   1ms  ##########
#  10ms  ################################################################
# 100ms
#    1s
#  10s+
# Tables
#    SHOW TABLE STATUS FROM `isupipe` LIKE 'reservation_slots'\G
#    SHOW CREATE TABLE `isupipe`.`reservation_slots`\G
# EXPLAIN /*!50100 PARTITIONS*/
SELECT * FROM reservation_slots WHERE start_at >= 1701158400 AND end_at <= 1701205200 FOR UPDATE\G

# Query 9: 578.54 QPS, 0.09x concurrency, ID 0x38BC86A45F31C6B1EE324671506C898A at byte 85240157
# This item is included in the report because it matches --limit.
# Scores: V/M = 0.00
# Time range: 2024-07-10T12:30:36 to 2024-07-10T12:31:57
# Attribute    pct   total     min     max     avg     95%  stddev  median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count          8   46862
# Exec time      4      7s    63us    13ms   147us   260us   254us   108us
# Lock time      3    51ms       0     2ms     1us     1us    14us     1us
# Rows sent      6  45.76k       1       1       1       1       0       1
# Rows examine   0  45.76k       1       1       1       1       0       1
# Query size     0   1.83M      38      41   40.93   40.45    0.46   40.45
# String:
# Databases    isupipe
# Hosts        ip-192-168-0-11.ap-northeast-1.compute.inter...
# Users        isucon
# Query_time distribution
#   1us
#  10us  ####################
# 100us  ################################################################
#   1ms  #
#  10ms  #
# 100ms
#    1s
#  10s+
# Tables
#    SHOW TABLE STATUS FROM `isupipe` LIKE 'themes'\G
#    SHOW CREATE TABLE `isupipe`.`themes`\G
# EXPLAIN /*!50100 PARTITIONS*/
SELECT * FROM themes WHERE user_id = 1023\G

# Query 10: 435.42 QPS, 0.09x concurrency, ID 0xFD38427AE3D09E3883A680F7BAF95D3A at byte 276411019
# This item is included in the report because it matches --limit.
# Scores: V/M = 0.00
# Time range: 2024-07-10T12:30:41 to 2024-07-10T12:31:55
# Attribute    pct   total     min     max     avg     95%  stddev  median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count          5   32221
# Exec time      3      6s    82us    14ms   196us   541us   415us   113us
# Lock time      2    43ms       0     5ms     1us     1us    31us     1us
# Rows sent      4  31.47k       1       1       1       1       0       1
# Rows examine   0   4.15k       0       3    0.13    0.99    0.36       0
# Query size     1   3.68M     117     120  119.83  118.34    0.69  118.34
# String:
# Databases    isupipe
# Hosts        ip-192-168-0-11.ap-northeast-1.compute.inter...
# Users        isucon
# Query_time distribution
#   1us
#  10us  #######################################################
# 100us  ################################################################
#   1ms  ###
#  10ms  #
# 100ms
#    1s
#  10s+
# Tables
#    SHOW TABLE STATUS FROM `isupipe` LIKE 'livestreams'\G
#    SHOW CREATE TABLE `isupipe`.`livestreams`\G
#    SHOW TABLE STATUS FROM `isupipe` LIKE 'livecomments'\G
#    SHOW CREATE TABLE `isupipe`.`livecomments`\G
# EXPLAIN /*!50100 PARTITIONS*/
SELECT IFNULL(SUM(l2.tip), 0) FROM livestreams l INNER JOIN livecomments l2 ON l.id = l2.livestream_id WHERE l.id = 3269\G

# Query 11: 435.45 QPS, 0.08x concurrency, ID 0xC499D81D570D361DB61FC43A94BB888A at byte 349592724
# This item is included in the report because it matches --limit.
# Scores: V/M = 0.00
# Time range: 2024-07-10T12:30:41 to 2024-07-10T12:31:55
# Attribute    pct   total     min     max     avg     95%  stddev  median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count          5   32223
# Exec time      3      6s    77us    11ms   179us   490us   373us   108us
# Lock time      2    40ms       0     4ms     1us     1us    25us     1us
# Rows sent      4  31.47k       1       1       1       1       0       1
# Rows examine   0   4.21k       0       4    0.13    0.99    0.36       0
# Query size     1   3.10M      98     101  100.83   97.36       0   97.36
# String:
# Databases    isupipe
# Hosts        ip-192-168-0-11.ap-northeast-1.compute.inter...
# Users        isucon
# Query_time distribution
#   1us
#  10us  #########################################################
# 100us  ################################################################
#   1ms  ###
#  10ms  #
# 100ms
#    1s
#  10s+
# Tables
#    SHOW TABLE STATUS FROM `isupipe` LIKE 'livestreams'\G
#    SHOW CREATE TABLE `isupipe`.`livestreams`\G
#    SHOW TABLE STATUS FROM `isupipe` LIKE 'reactions'\G
#    SHOW CREATE TABLE `isupipe`.`reactions`\G
# EXPLAIN /*!50100 PARTITIONS*/
SELECT COUNT(*) FROM livestreams l INNER JOIN reactions r ON l.id = r.livestream_id WHERE l.id = 5388\G

# Query 12: 547.12 QPS, 0.07x concurrency, ID 0xEA1E6309EEEFF9A6831AD2FB940FC23C at byte 77544809
# This item is included in the report because it matches --limit.
# Scores: V/M = 0.00
# Time range: 2024-07-10T12:30:36 to 2024-07-10T12:31:57
# Attribute    pct   total     min     max     avg     95%  stddev  median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count          7   44317
# Exec time      3      5s    47us    23ms   119us   194us   327us    84us
# Lock time      3    48ms       0     4ms     1us     1us    18us     1us
# Rows sent      5  43.28k       1       1       1       1       0       1
# Rows examine   0  43.28k       1       1       1       1       0       1
# Query size     0   1.48M      32      35   34.93   34.95    0.46   34.95
# String:
# Databases    isupipe
# Hosts        ip-192-168-0-11.ap-northeast-1.compute.inter...
# Users        isucon
# Query_time distribution
#   1us
#  10us  ################################################################
# 100us  #################
#   1ms  #
#  10ms  #
# 100ms
#    1s
#  10s+
# Tables
#    SHOW TABLE STATUS FROM `isupipe` LIKE 'users'\G
#    SHOW CREATE TABLE `isupipe`.`users`\G
# EXPLAIN /*!50100 PARTITIONS*/
SELECT * FROM users WHERE id = 1150\G

# Query 13: 330.52 QPS, 0.06x concurrency, ID 0xF7144185D9A142A426A36DC55C1D2623 at byte 118664225
# This item is included in the report because it matches --limit.
# Scores: V/M = 0.00
# Time range: 2024-07-10T12:30:36 to 2024-07-10T12:31:57
# Attribute    pct   total     min     max     avg     95%  stddev  median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count          4   26772
# Exec time      2      5s    59us    37ms   177us   316us   626us   119us
# Lock time      1    28ms       0     1ms     1us     1us     8us     1us
# Rows sent     16 119.53k       0      11    4.57    4.96    1.18    4.96
# Rows examine   0 119.53k       0      11    4.57    4.96    1.18    4.96
# Query size     0   1.43M      53      56   55.99   54.21    0.10   54.21
# String:
# Databases    isupipe
# Hosts        ip-192-168-0-11.ap-northeast-1.compute.inter...
# Users        isucon
# Query_time distribution
#   1us
#  10us  #########
# 100us  ################################################################
#   1ms  #
#  10ms  #
# 100ms
#    1s
#  10s+
# Tables
#    SHOW TABLE STATUS FROM `isupipe` LIKE 'livestream_tags'\G
#    SHOW CREATE TABLE `isupipe`.`livestream_tags`\G
# EXPLAIN /*!50100 PARTITIONS*/
SELECT * FROM livestream_tags WHERE livestream_id = 7597\G

# Query 14: 162.90 QPS, 0.04x concurrency, ID 0xFFFCA4D67EA0A788813031B8BBC3B329 at byte 315034183
# This item is included in the report because it matches --limit.
# Scores: V/M = 0.04
# Time range: 2024-07-10T12:30:36 to 2024-07-10T12:31:57
# Attribute    pct   total     min     max     avg     95%  stddev  median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count          2   13195
# Exec time      1      3s    15us   101ms   231us   167us     3ms    44us
# Lock time      0       0       0       0       0       0       0       0
# Rows sent      0       0       0       0       0       0       0       0
# Rows examine   0       0       0       0       0       0       0       0
# Query size     0  77.31k       6       6       6       6       0       6
# String:
# Databases    isupipe
# Hosts        ip-192-168-0-11.ap-northeast-1.compute.inter...
# Users        isucon
# Query_time distribution
#   1us
#  10us  ################################################################
# 100us  ###########
#   1ms  #
#  10ms  #
# 100ms  #
#    1s
#  10s+
COMMIT\G

# Query 15: 279.12 QPS, 0.03x concurrency, ID 0xD6032FE08E1FE706A928B8B7CBA06B85 at byte 274557639
# This item is included in the report because it matches --limit.
# Scores: V/M = 0.00
# Time range: 2024-07-10T12:30:41 to 2024-07-10T12:31:57
# Attribute    pct   total     min     max     avg     95%  stddev  median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count          3   21213
# Exec time      1      3s    49us     9ms   122us   194us   224us    89us
# Lock time      1    24ms       0     1ms     1us     1us    11us     1us
# Rows sent      2  20.72k       1       1       1       1       0       1
# Rows examine   0  20.72k       1       1       1       1       0       1
# Query size     0 849.01k      38      41   40.98   40.45    0.23   40.45
# String:
# Databases    isupipe
# Hosts        ip-192-168-0-11.ap-northeast-1.compute.inter...
# Users        isucon
# Query_time distribution
#   1us
#  10us  ################################################################
# 100us  #######################################
#   1ms  #
#  10ms
# 100ms
#    1s
#  10s+
# Tables
#    SHOW TABLE STATUS FROM `isupipe` LIKE 'livestreams'\G
#    SHOW CREATE TABLE `isupipe`.`livestreams`\G
# EXPLAIN /*!50100 PARTITIONS*/
SELECT * FROM livestreams WHERE id = 7602\G

# Query 16: 59.78 QPS, 0.02x concurrency, ID 0x59F1B6DD8D9FEC059E55B3BFD624E8C3 at byte 51162331
# This item is included in the report because it matches --limit.
# Scores: V/M = 0.00
# Time range: 2024-07-10T12:30:36 to 2024-07-10T12:31:57
# Attribute    pct   total     min     max     avg     95%  stddev  median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count          0    4842
# Exec time      0      2s    67us    11ms   314us     1ms   628us   113us
# Lock time      0    11ms       0     3ms     2us     1us    52us     1us
# Rows sent      0   4.73k       1       1       1       1       0       1
# Rows examine   0   4.73k       1       1       1       1       0       1
# Query size     0 406.65k      86      86      86      86       0      86
# String:
# Databases    isupipe
# Hosts        ip-192-168-0-11.ap-northeast-1.compute.inter...
# Users        isucon
# Query_time distribution
#   1us
#  10us  #########
# 100us  ################################################################
#   1ms  #####
#  10ms  #
# 100ms
#    1s
#  10s+
# Tables
#    SHOW TABLE STATUS FROM `isupipe` LIKE 'reservation_slots'\G
#    SHOW CREATE TABLE `isupipe`.`reservation_slots`\G
# EXPLAIN /*!50100 PARTITIONS*/
SELECT slot FROM reservation_slots WHERE start_at = 1701208800 AND end_at = 1701212400\G
iwashi623 commented 3 months ago
+-------+-----+------+-----+-----+-----+--------+-------------------------------------------+-------+--------+---------+--------+--------+--------+--------+--------+-----------+------------+---------------+-----------+
| COUNT | 1XX | 2XX  | 3XX | 4XX | 5XX | METHOD |                    URI                    |  MIN  |  MAX   |   SUM   |  AVG   |  P90   |  P95   |  P99   | STDDEV | MIN(BODY) | MAX(BODY)  |   SUM(BODY)   | AVG(BODY) |
+-------+-----+------+-----+-----+-----+--------+-------------------------------------------+-------+--------+---------+--------+--------+--------+--------+--------+-----------+------------+---------------+-----------+
| 8944  | 0   | 8942 | 0   | 2   | 0   | GET    | /api/user/[-0-9a-zA-Z]+                   | 0.004 | 12.024 | 183.636 | 0.021  | 0.012  | 0.012  | 0.020  | 0.352  | 0.000     | 164850.000 | 506794572.000 | 56663.078 |
| 1086  | 0   | 1084 | 0   | 2   | 0   | GET    | /api/livestream/[-0-9a-zA-Z]+/livecomment | 0.004 | 0.700  | 134.552 | 0.124  | 0.264  | 0.348  | 0.580  | 0.119  | 0.000     | 74691.000  | 15857766.000  | 14601.994 |
| 1120  | 0   | 1117 | 0   | 3   | 0   | GET    | /api/livestream/[-0-9a-zA-Z]+/reaction    | 0.004 | 0.660  | 129.648 | 0.116  | 0.256  | 0.340  | 0.556  | 0.117  | 0.000     | 71904.000  | 14859118.000  | 13267.070 |
| 43    | 0   | 40   | 0   | 3   | 0   | POST   | /api/livestream/[-0-9a-zA-Z]+/moderate    | 0.168 | 6.196  | 128.148 | 2.980  | 4.864  | 5.912  | 6.196  | 1.233  | 0.000     | 23.000     | 920.000       | 21.395    |
| 117   | 0   | 117  | 0   | 0   | 0   | GET    | /api/livestream/search                    | 0.040 | 1.420  | 68.632  | 0.587  | 0.936  | 1.108  | 1.356  | 0.264  | 49505.000 | 160037.000 | 8530249.000   | 72908.111 |
| 6     | 0   | 2    | 0   | 4   | 0   | GET    | /api/livestream/[-0-9a-zA-Z]+/statistics  | 2.440 | 20.004 | 68.052  | 11.342 | 20.004 | 20.004 | 20.004 | 8.663  | 0.000     | 102.000    | 202.000       | 33.667    |
| 464   | 0   | 460  | 0   | 4   | 0   | POST   | /api/livestream/reservation               | 0.020 | 0.200  | 47.164  | 0.102  | 0.136  | 0.148  | 0.180  | 0.033  | 0.000     | 1469.000   | 539505.000    | 1162.726  |
| 2764  | 0   | 2541 | 0   | 1   | 222 | POST   | /api/icon                                 | 0.004 | 0.104  | 38.624  | 0.014  | 0.024  | 0.028  | 0.040  | 0.007  | 0.000     | 154.000    | 76375.000     | 27.632    |
| 2731  | 0   | 2729 | 0   | 1   | 1   | POST   | /api/register                             | 0.004 | 0.168  | 27.268  | 0.010  | 0.016  | 0.016  | 0.024  | 0.008  | 67.000    | 522.000    | 1283113.000   | 469.833   |
| 1126  | 0   | 1117 | 0   | 9   | 0   | POST   | /api/livestream/[-0-9a-zA-Z]+/livecomment | 0.004 | 0.128  | 24.360  | 0.022  | 0.032  | 0.036  | 0.052  | 0.010  | 0.000     | 2713.000   | 2184263.000   | 1939.843  |
| 1001  | 0   | 1001 | 0   | 0   | 0   | POST   | /api/livestream/[-0-9a-zA-Z]+/reaction    | 0.004 | 0.128  | 19.672  | 0.020  | 0.028  | 0.032  | 0.048  | 0.010  | 1552.000  | 2212.000   | 1851601.000   | 1849.751  |
| 2737  | 0   | 2735 | 0   | 2   | 0   | POST   | /api/login                                | 0.004 | 0.056  | 16.560  | 0.006  | 0.012  | 0.012  | 0.016  | 0.003  | 0.000     | 64.000     | 128.000       | 0.047     |
| 452   | 0   | 452  | 0   | 0   | 0   | GET    | /api/tag                                  | 0.004 | 0.028  | 2.436   | 0.005  | 0.008  | 0.012  | 0.020  | 0.004  | 6089.000  | 6089.000   | 2752228.000   | 6089.000  |
| 1     | 0   | 1    | 0   | 0   | 0   | POST   | /api/initialize                           | 2.416 | 2.416  | 2.416   | 2.416  | 2.416  | 2.416  | 2.416  | 0.000  | 27.000    | 27.000     | 27.000        | 27.000    |
| 173   | 0   | 173  | 0   | 0   | 0   | GET    | /api/livestream                           | 0.004 | 0.088  | 1.600   | 0.009  | 0.020  | 0.024  | 0.036  | 0.010  | 3.000     | 22538.000  | 180910.000    | 1045.723  |
| 123   | 0   | 123  | 0   | 0   | 0   | GET    | /api/livestream/[-0-9a-zA-Z]+/report      | 0.004 | 0.088  | 1.232   | 0.010  | 0.024  | 0.036  | 0.060  | 0.013  | 3.000     | 5528.000   | 58075.000     | 472.154   |
| 100   | 0   | 100  | 0   | 0   | 0   | POST   | /api/livestream/[-0-9a-zA-Z]+/enter       | 0.004 | 0.124  | 0.536   | 0.005  | 0.008  | 0.008  | 0.012  | 0.012  | 0.000     | 0.000      | 0.000         | 0.000     |
| 91    | 0   | 91   | 0   | 0   | 0   | DELETE | /api/livestream/[-0-9a-zA-Z]+/exit        | 0.004 | 0.020  | 0.404   | 0.004  | 0.008  | 0.008  | 0.020  | 0.003  | 0.000     | 0.000      | 0.000         | 0.000     |
| 79    | 0   | 79   | 0   | 0   | 0   | GET    | /api/livestream/[-0-9a-zA-Z]+/ngwords     | 0.004 | 0.016  | 0.376   | 0.005  | 0.008  | 0.008  | 0.016  | 0.003  | 5.000     | 149.000    | 1193.000      | 15.101    |
| 1     | 0   | 1    | 0   | 0   | 0   | GET    | /api/livestream/7497                      | 0.004 | 0.004  | 0.004   | 0.004  | 0.004  | 0.004  | 0.004  | 0.000  | 1469.000  | 1469.000   | 1469.000      | 1469.000  |
| 1     | 0   | 1    | 0   | 0   | 0   | GET    | /api/payment                              | 0.000 | 0.000  | 0.000   | 0.000  | 0.000  | 0.000  | 0.000  | 0.000  | 21.000    | 21.000     | 21.000        | 21.000    |
+-------+-----+------+-----+-----+-----+--------+-------------------------------------------+-------+--------+---------+--------+--------+--------+--------+--------+-----------+------------+---------------+-----------+
iwashi623 commented 3 months ago
sudo cat /var/log/nginx/access.log | alp ltsv -m "/api/user/[-0-9a-zA-Z]+","/api/livestream/[-0-9a-zA-Z]+/livecomment","/api/livestream/[-0-9a-zA-Z]+/livecomment/[-0-9]+/report","/api/livestream/[-0-9a-zA-Z]+/livecomment","/api/livestream/[-0-9a-zA-Z]+/reaction","/api/livestream/[-0-9a-zA-Z]+/moderate","/api/livestream/[-0-9a-zA-Z]+/statistics","/api/livestream/[-0-9a-zA-Z]+/livecomment","/api/livestream/[-0-9a-zA-Z]+/reaction","/api/livestream/[-0-9a-zA-Z]+/report","/api/livestream/[-0-9a-zA-Z]+/ngwords","/api/livestream/[-0-9a-zA-Z]+/enter","/api/livestream/[-0-9a-zA-Z]+/exit","/api/user/[-0-9a-zA-Z]+/theme"  --sort=sum --reverse --filters 'Time > TimeAgo("30m")'
+-------+-----+------+-----+-----+-----+--------+-------------------------------------------+-------+--------+---------+--------+--------+--------+--------+--------+-----------+------------+---------------+-----------+
| COUNT | 1XX | 2XX  | 3XX | 4XX | 5XX | METHOD |                    URI                    |  MIN  |  MAX   |   SUM   |  AVG   |  P90   |  P95   |  P99   | STDDEV | MIN(BODY) | MAX(BODY)  |   SUM(BODY)   | AVG(BODY) |
+-------+-----+------+-----+-----+-----+--------+-------------------------------------------+-------+--------+---------+--------+--------+--------+--------+--------+-----------+------------+---------------+-----------+
| 8683  | 0   | 8680 | 0   | 3   | 0   | GET    | /api/user/[-0-9a-zA-Z]+                   | 0.004 | 10.564 | 181.784 | 0.021  | 0.012  | 0.016  | 0.020  | 0.350  | 0.000     | 171698.000 | 470883372.000 | 54230.493 |
| 973   | 0   | 971  | 0   | 2   | 0   | GET    | /api/livestream/[-0-9a-zA-Z]+/livecomment | 0.020 | 0.752  | 140.027 | 0.144  | 0.312  | 0.424  | 0.608  | 0.135  | 0.000     | 79728.000  | 15691053.000  | 16126.468 |
| 1008  | 0   | 1005 | 0   | 3   | 0   | GET    | /api/livestream/[-0-9a-zA-Z]+/reaction    | 0.004 | 0.752  | 134.292 | 0.133  | 0.296  | 0.408  | 0.588  | 0.132  | 0.000     | 76770.000  | 14615481.000  | 14499.485 |
| 39    | 0   | 36   | 0   | 3   | 0   | POST   | /api/livestream/[-0-9a-zA-Z]+/moderate    | 0.176 | 6.565  | 109.635 | 2.811  | 4.368  | 6.196  | 6.565  | 1.244  | 0.000     | 23.000     | 828.000       | 21.231    |
| 142   | 0   | 142  | 0   | 0   | 0   | GET    | /api/livestream/search                    | 0.036 | 1.388  | 83.708  | 0.589  | 0.828  | 1.064  | 1.336  | 0.243  | 49598.000 | 155955.000 | 10076189.000  | 70959.077 |
| 5     | 0   | 2    | 0   | 3   | 0   | GET    | /api/livestream/[-0-9a-zA-Z]+/statistics  | 2.452 | 20.017 | 64.947  | 12.989 | 20.017 | 20.017 | 20.017 | 8.597  | 0.000     | 102.000    | 202.000       | 40.400    |
| 495   | 0   | 491  | 0   | 4   | 0   | POST   | /api/livestream/reservation               | 0.024 | 0.196  | 48.685  | 0.098  | 0.132  | 0.148  | 0.180  | 0.032  | 0.000     | 1471.000   | 575964.000    | 1163.564  |
| 2679  | 0   | 2472 | 0   | 0   | 207 | POST   | /api/icon                                 | 0.004 | 0.156  | 40.469  | 0.015  | 0.024  | 0.028  | 0.040  | 0.007  | 14.000    | 154.000    | 72884.000     | 27.206    |
| 1029  | 0   | 1027 | 0   | 2   | 0   | POST   | /api/livestream/[-0-9a-zA-Z]+/livecomment | 0.004 | 0.124  | 24.384  | 0.024  | 0.036  | 0.040  | 0.048  | 0.010  | 57.000    | 2685.000   | 2016056.000   | 1959.238  |
| 2643  | 0   | 2641 | 0   | 1   | 1   | POST   | /api/register                             | 0.004 | 0.140  | 24.316  | 0.009  | 0.016  | 0.016  | 0.020  | 0.006  | 67.000    | 519.000    | 1233949.000   | 466.874   |
| 906   | 0   | 905  | 0   | 1   | 0   | POST   | /api/livestream/[-0-9a-zA-Z]+/reaction    | 0.004 | 0.132  | 19.256  | 0.021  | 0.032  | 0.036  | 0.044  | 0.010  | 0.000     | 2217.000   | 1676584.000   | 1850.534  |
| 2648  | 0   | 2646 | 0   | 2   | 0   | POST   | /api/login                                | 0.004 | 0.040  | 18.688  | 0.007  | 0.012  | 0.012  | 0.016  | 0.004  | 0.000     | 64.000     | 128.000       | 0.048     |
| 483   | 0   | 483  | 0   | 0   | 0   | GET    | /api/tag                                  | 0.004 | 0.020  | 2.824   | 0.006  | 0.008  | 0.012  | 0.016  | 0.003  | 6089.000  | 6089.000   | 2940987.000   | 6089.000  |
| 226   | 0   | 226  | 0   | 0   | 0   | GET    | /api/livestream                           | 0.000 | 0.064  | 2.376   | 0.011  | 0.024  | 0.028  | 0.044  | 0.009  | 3.000     | 22631.000  | 215406.000    | 953.124   |
| 1     | 0   | 1    | 0   | 0   | 0   | POST   | /api/initialize                           | 2.376 | 2.376  | 2.376   | 2.376  | 2.376  | 2.376  | 2.376  | 0.000  | 27.000    | 27.000     | 27.000        | 27.000    |
| 173   | 0   | 173  | 0   | 0   | 0   | GET    | /api/livestream/[-0-9a-zA-Z]+/report      | 0.004 | 0.208  | 1.844   | 0.011  | 0.012  | 0.024  | 0.140  | 0.022  | 3.000     | 21623.000  | 82577.000     | 477.324   |
| 83    | 0   | 83   | 0   | 0   | 0   | POST   | /api/livestream/[-0-9a-zA-Z]+/enter       | 0.004 | 0.168  | 0.604   | 0.007  | 0.012  | 0.012  | 0.168  | 0.018  | 0.000     | 0.000      | 0.000         | 0.000     |
| 104   | 0   | 104  | 0   | 0   | 0   | GET    | /api/livestream/[-0-9a-zA-Z]+/ngwords     | 0.004 | 0.020  | 0.568   | 0.005  | 0.008  | 0.012  | 0.016  | 0.004  | 5.000     | 149.000    | 1189.000      | 11.433    |
| 75    | 0   | 75   | 0   | 0   | 0   | DELETE | /api/livestream/[-0-9a-zA-Z]+/exit        | 0.012 | 0.012  | 0.364   | 0.005  | 0.008  | 0.012  | 0.012  | 0.003  | 0.000     | 0.000      | 0.000         | 0.000     |
| 1     | 0   | 1    | 0   | 0   | 0   | GET    | /api/livestream/7497                      | 0.004 | 0.004  | 0.004   | 0.004  | 0.004  | 0.004  | 0.004  | 0.000  | 1471.000  | 1471.000   | 1471.000      | 1471.000  |
| 1     | 0   | 1    | 0   | 0   | 0   | GET    | /api/payment                              | 0.000 | 0.000  | 0.000   | 0.000  | 0.000  | 0.000  | 0.000  | 0.000  | 21.000    | 21.000     | 21.000        | 21.000    |
+-------+-----+------+-----+-----+-----+--------+-------------------------------------------+-------+--------+---------+--------+--------+--------+--------+--------+-----------+------------+---------------+-----------+