sqlite-web 0.7.2
gitea.db
action_run_job
Create
Query
access
access_token
action
action_artifact
action_run
action_run_index
action_run_job
action_runner
action_runner_token
action_schedule
action_schedule_spec
action_task
action_task_output
action_task_step
action_tasks_version
action_variable
app_state
attachment
auth_token
badge
branch
collaboration
comment
commit_status
commit_status_index
commit_status_summary
commit_sync_log
commit_sync_status
dbfs_data
dbfs_meta
deploy_key
email_address
email_hash
external_login_user
follow
gpg_key
gpg_key_import
hook_task
issue
issue_assignees
issue_content_history
issue_dependency
issue_index
issue_label
issue_pin
issue_user
issue_watch
label
language_stat
lfs_lock
lfs_meta_object
login_source
milestone
mirror
notice
notification
oauth2_application
oauth2_authorization_code
oauth2_grant
org_user
package
package_blob
package_blob_upload
package_cleanup_rule
package_file
package_property
package_version
project
project_board
project_issue
protected_branch
protected_tag
public_key
pull_auto_merge
pull_request
push_mirror
reaction
release
renamed_branch
repo_archiver
repo_hidden_file
repo_indexer_status
repo_license
repo_redirect
repo_topic
repo_transfer
repo_unit
repository
review
review_state
secret
session
sqlite_sequence
star
stopwatch
system_setting
task
team
team_invite
team_repo
team_unit
team_user
topic
tracked_time
two_factor
upload
user
user_badge
user_blocking
user_open_id
user_redirect
user_setting
version
watch
webauthn_credential
webhook
Toggle helper tables
Structure
Content
Query
Insert
Drop
Import
Export
Delete row 9068 from action_run_job
id
9068
run_id
7307
repo_id
6
owner_id
5
commit_sha
339ea969ec2633756fb1a155d47723d0f61396a4
is_fork_pull_request
0
name
🧠 内存泄漏检测
attempt
1
workflow_payload
name: Performance Tests "on": # 每周一凌晨
name: Performance Tests "on": # 每周一凌晨 2 点运行 schedule: - cron: '0 2 * * 1' # 允许手动触发 workflow_dispatch: inputs: test_type: description: '测试类型' required: true default: 'benchmark' type: choice options: - benchmark - load - stress - all duration: description: '测试持续时间(秒)' required: false default: '60' type: string concurrency: description: '并发数' required: false default: '10' type: string # PR 触发时只运行基准测试 pull_request: branches: [main] paths: - 'backend/src/**' - 'backend/prisma/**' env: NODE_VERSION: "18" PNPM_VERSION: "8" jobs: memory-leak-detection: name: "\U0001F9E0 内存泄漏检测" runs-on: ubuntu-latest if: needs.setup.outputs.test_type == 'all' steps: - name: "\U0001F4E5 检出代码" uses: actions/checkout@v4 - name: "\U0001F4E6 安装 pnpm" uses: pnpm/action-setup@v2 with: version: ${{ env.PNPM_VERSION }} - name: "\U0001F7E2 设置 Node.js" uses: actions/setup-node@v4 with: cache: pnpm node-version: ${{ env.NODE_VERSION }} - name: "\U0001F4E6 安装依赖" run: pnpm install --frozen-lockfile - name: "\U0001F5C4️ 初始化数据库" run: | cd backend npx prisma migrate deploy npx prisma db seed env: DATABASE_URL: postgresql://test:test@localhost:5432/juhi_mem - name: "\U0001F528 构建后端" run: | pnpm --filter shared build pnpm --filter backend build - name: "\U0001F9E0 运行内存泄漏检测" run: "cd backend\n# 使用 --expose-gc 启动服务并检测内存\nnode --expose-gc -e \"\nconst http = require('http');\n\nasync function measureMemory() {\n if (global.gc) global.gc();\n const used = process.memoryUsage();\n return {\n heapUsed: Math.round(used.heapUsed / 1024 / 1024),\n heapTotal: Math.round(used.heapTotal / 1024 / 1024),\n rss: Math.round(used.rss / 1024 / 1024),\n };\n}\n\nasync function main() {\n console.log('\U0001F9E0 内存泄漏检测开始');\n\n const before = await measureMemory();\n console.log('初始内存:', before);\n\n // 模拟 1000 次请求\n for (let i = 0; i < 1000; i++) {\n // 模拟内存分配\n const arr = new Array(10000).fill(Math.random());\n if (i % 100 === 0) {\n if (global.gc) global.gc();\n console.log('进度:', i);\n }\n }\n\n if (global.gc) global.gc();\n await new Promise(r => setTimeout(r, 1000));\n if (global.gc) global.gc();\n\n const after = await measureMemory();\n console.log('最终内存:', after);\n\n const diff = after.heapUsed - before.heapUsed;\n console.log('内存增长:', diff, 'MB');\n\n if (diff > 50) {\n console.log('⚠️ 警告: 可能存在内存泄漏');\n process.exit(1);\n } else {\n console.log('✅ 内存使用正常');\n }\n}\n\nmain().catch(err => {\n console.error(err);\n process.exit(1);\n});\n\" | tee memory-leak-output.txt\n" env: NODE_ENV: test DATABASE_URL: postgresql://test:test@localhost:5432/juhi_mem REDIS_URL: redis://localhost:6379 - name: "\U0001F4DD 生成内存检测报告" run: "echo \"## \U0001F9E0 内存泄漏检测报告\" >> $GITHUB_STEP_SUMMARY\necho \"\" >> $GITHUB_STEP_SUMMARY\n\nif [ -f \"backend/memory-leak-output.txt\" ]; then\n echo '```' >> $GITHUB_STEP_SUMMARY\n cat backend/memory-leak-output.txt >> $GITHUB_STEP_SUMMARY\n echo '```' >> $GITHUB_STEP_SUMMARY\nfi\n" timeout-minutes: "30" services: postgres: image: postgres:15 env: POSTGRES_DB: juhi_mem POSTGRES_PASSWORD: test POSTGRES_USER: test ports: - 5432:5432 redis: image: redis:7 ports: - 6379:6379
...
job_id
memory-leak-detection
needs
["setup"]
runs_on
["ubuntu-latest"]
task_id
7840
status
2
started
1774231423
stopped
1774231445
created
1774231240
updated
1774231445
raw_concurrency
is_concurrency_evaluated
1
concurrency_group
concurrency_cancel
0
Delete
Cancel