Skip to content
GitLab
菜单
为什么选择 GitLab
定价
联系销售
探索
为什么选择 GitLab
定价
联系销售
探索
登录
获取免费试用
主导航
搜索或转到…
项目
GitLab
管理
动态
成员
标记
计划
议题
议题看板
里程碑
迭代
需求
代码
合并请求
仓库
分支
提交
标签
仓库图
比较修订版本
代码片段
锁定的文件
构建
流水线
作业
流水线计划
测试用例
产物
部署
发布
Package registry
Container registry
模型注册表
运维
环境
Terraform 模块
监控
事件
服务台
分析
价值流分析
贡献者分析
CI/CD 分析
仓库分析
代码评审分析
议题分析
洞察
模型实验
效能分析
帮助
帮助
支持
GitLab 文档
比较 GitLab 各版本
社区论坛
为极狐GitLab 提交贡献
提交反馈
隐私声明
快捷键
?
新增功能
4
代码片段
群组
项目
显示更多面包屑
gitlab-cn
GitLab
提交
7c38c0b4
提交
7c38c0b4
编辑于
5 years ago
作者:
Rémy Coutable
浏览文件
操作
下载
补丁
差异文件
Revert "Merge branch '62722-boot-app-in-ci-and-check-memory' into 'master'"
This reverts merge request !30031
上级
fd5772a8
No related branches found
分支 包含提交
No related tags found
标签 包含提交
无相关合并请求
变更
4
隐藏空白变更内容
行内
左右并排
显示
4 个更改的文件
.gitlab/ci/memory.gitlab-ci.yml
+0
-23
0 个添加, 23 个删除
.gitlab/ci/memory.gitlab-ci.yml
config/boot.rb
+1
-1
1 个添加, 1 个删除
config/boot.rb
scripts/generate-memory-metrics-on-boot
+0
-11
0 个添加, 11 个删除
scripts/generate-memory-metrics-on-boot
scripts/prepare_build.sh
+4
-5
4 个添加, 5 个删除
scripts/prepare_build.sh
有
5 个添加
和
40 个删除
.gitlab/ci/memory.gitlab-ci.yml
+
0
−
23
浏览文件 @
7c38c0b4
...
@@ -17,26 +17,3 @@ memory-static:
...
@@ -17,26 +17,3 @@ memory-static:
-
tmp/memory_*.txt
-
tmp/memory_*.txt
reports
:
reports
:
metrics
:
tmp/memory_metrics.txt
metrics
:
tmp/memory_metrics.txt
# Show memory usage caused by invoking require per gem.
# Unlike `memory-static`, it hits the app with one request to ensure that any last minute require-s have been called.
# The application is booted in `production` environment.
# All tests are run without a webserver (directly using Rack::Mock by default).
memory-on-boot
:
extends
:
.rspec-metadata-pg-10
variables
:
NODE_ENV
:
"
production"
RAILS_ENV
:
"
production"
SETUP_DB
:
"
true"
SKIP_STORAGE_VALIDATION
:
"
true"
# we override the max_old_space_size to prevent OOM errors
NODE_OPTIONS
:
--max_old_space_size=3584
script
:
# Both bootsnap and derailed monkey-patch Kernel#require, which leads to circular dependency
-
DISABLE_BOOTSNAP=true PATH_TO_HIT="/users/sign_in" CUT_OFF=0.3 bundle exec derailed exec perf:mem >> 'tmp/memory_on_boot.txt'
-
scripts/generate-memory-metrics-on-boot tmp/memory_on_boot.txt >> 'tmp/memory_on_boot_metrics.txt'
artifacts
:
paths
:
-
tmp/memory_*.txt
reports
:
metrics
:
tmp/memory_on_boot_metrics.txt
此差异已折叠。
点击以展开。
config/boot.rb
+
1
−
1
浏览文件 @
7c38c0b4
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
# Set up gems listed in the Gemfile.
# Set up gems listed in the Gemfile.
require
'bundler/setup'
if
File
.
exist?
(
ENV
[
'BUNDLE_GEMFILE'
])
require
'bundler/setup'
if
File
.
exist?
(
ENV
[
'BUNDLE_GEMFILE'
])
begin
begin
require
'bootsnap/setup'
unless
ENV
[
'DISABLE_BOOTSNAP'
]
require
'bootsnap/setup'
rescue
LoadError
rescue
LoadError
# bootsnap is an optional dependency, so if we don't have it, it's fine
# bootsnap is an optional dependency, so if we don't have it, it's fine
end
end
此差异已折叠。
点击以展开。
scripts/generate-memory-metrics-on-boot
已删除
100755 → 0
+
0
−
11
浏览文件 @
fd5772a8
#!/usr/bin/env ruby
abort
"usage:
#{
__FILE__
}
<memory_bundle_mem_file_name>"
unless
ARGV
.
length
==
1
memory_bundle_mem_file_name
=
ARGV
.
first
full_report
=
File
.
open
(
memory_bundle_mem_file_name
).
read
stats
=
/TOP: (?<total_mibs_str>.*) MiB/
.
match
(
full_report
)
abort
'failed to process the benchmark output'
unless
stats
puts
"total_memory_used_by_dependencies_on_boot_prod_env_mb
#{
stats
[
:total_mibs_str
].
to_f
.
round
(
1
)
}
"
此差异已折叠。
点击以展开。
scripts/prepare_build.sh
+
4
−
5
浏览文件 @
7c38c0b4
...
@@ -35,7 +35,6 @@ sed -i 's/username: root/username: gitlab/g' config/database.yml
...
@@ -35,7 +35,6 @@ sed -i 's/username: root/username: gitlab/g' config/database.yml
if
[
"
$GITLAB_DATABASE
"
=
'postgresql'
]
;
then
if
[
"
$GITLAB_DATABASE
"
=
'postgresql'
]
;
then
sed
-i
's/localhost/postgres/g'
config/database.yml
sed
-i
's/localhost/postgres/g'
config/database.yml
sed
-i
's/username: git/username: postgres/g'
config/database.yml
if
[
-f
config/database_geo.yml
]
;
then
if
[
-f
config/database_geo.yml
]
;
then
sed
-i
's/localhost/postgres/g'
config/database_geo.yml
sed
-i
's/localhost/postgres/g'
config/database_geo.yml
...
@@ -49,16 +48,16 @@ else # Assume it's mysql
...
@@ -49,16 +48,16 @@ else # Assume it's mysql
fi
fi
cp
config/resque.yml.example config/resque.yml
cp
config/resque.yml.example config/resque.yml
sed
-i
's
|url:.*$|url: redis://redis:6379|
g'
config/resque.yml
sed
-i
's
/localhost/redis/
g'
config/resque.yml
cp
config/redis.cache.yml.example config/redis.cache.yml
cp
config/redis.cache.yml.example config/redis.cache.yml
sed
-i
's
|url:.*$|url: redis://redis:6379/10|
g'
config/redis.cache.yml
sed
-i
's
/localhost/redis/
g'
config/redis.cache.yml
cp
config/redis.queues.yml.example config/redis.queues.yml
cp
config/redis.queues.yml.example config/redis.queues.yml
sed
-i
's
|url:.*$|url: redis://redis:6379/11|
g'
config/redis.queues.yml
sed
-i
's
/localhost/redis/
g'
config/redis.queues.yml
cp
config/redis.shared_state.yml.example config/redis.shared_state.yml
cp
config/redis.shared_state.yml.example config/redis.shared_state.yml
sed
-i
's
|url:.*$|url: redis://redis:6379/12|
g'
config/redis.shared_state.yml
sed
-i
's
/localhost/redis/
g'
config/redis.shared_state.yml
if
[
"
$SETUP_DB
"
!=
"false"
]
;
then
if
[
"
$SETUP_DB
"
!=
"false"
]
;
then
setup_db
setup_db
...
...
此差异已折叠。
点击以展开。
预览
0%
加载中
请重试
或
添加新附件
.
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
保存评论
取消
想要评论请
注册
或
登录