good morning!!!!
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
W
websocket
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
open
websocket
Commits
f0ac7040
Unverified
Commit
f0ac7040
authored
5 years ago
by
Anmol Sethi
Browse files
Options
Downloads
Patches
Plain Diff
Improve local CI experience
parent
0236290a
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
ci/bench/entrypoint.sh
+5
-4
5 additions, 4 deletions
ci/bench/entrypoint.sh
ci/run.sh
+21
-0
21 additions, 0 deletions
ci/run.sh
ci/test/entrypoint.sh
+2
-3
2 additions, 3 deletions
ci/test/entrypoint.sh
with
28 additions
and
7 deletions
ci/bench/entrypoint.sh
+
5
−
4
View file @
f0ac7040
...
...
@@ -3,12 +3,13 @@
source
ci/lib.sh
||
exit
1
mkdir
-p
profs
go
test
--vet
=
off
--run
=
^
$
-bench
=
.
\
-cpuprofile
=
profs/cpu
\
-memprofile
=
profs/mem
\
-blockprofile
=
profs/block
\
-mutexprofile
=
profs/mutex
\
./...
# -cpuprofile=profs/cpu \
# -memprofile=profs/mem \
# -blockprofile=profs/block \
# -mutexprofile=profs/mutex \
set
+x
echo
"profiles are in ./profs
...
...
This diff is collapsed.
Click to expand it.
ci/run.sh
+
21
−
0
View file @
f0ac7040
...
...
@@ -18,6 +18,19 @@ function docker_run() {
"
${
IMAGE
}
"
}
function
help
()
{
set
+x
echo
echo
"
$0
[-h] <step>"
cat
<<
EOF
If you do not pass in an explicit step, all steps will be ran in order.
Pass "analyze" as the step to be put into an interactive container to analyze
profiles.
EOF
exit
1
}
# Use this to analyze benchmark profiles.
if
[[
${
1
-
}
==
"analyze"
]]
;
then
docker run
\
...
...
@@ -29,7 +42,15 @@ if [[ ${1-} == "analyze" ]]; then
golang:1.12
fi
if
[[
${
1
-
}
==
"-h"
||
${
1
-
}
==
"--help"
||
${
1
-
}
==
"help"
]]
;
then
help
fi
if
[[
$#
-gt
0
]]
;
then
if
[[
!
-d
"ci/
$*
"
]]
;
then
help
fi
docker_run
"ci/
$*
"
exit
0
fi
...
...
This diff is collapsed.
Click to expand it.
ci/test/entrypoint.sh
+
2
−
3
View file @
f0ac7040
...
...
@@ -16,10 +16,9 @@ go tool cover -func=profs/coverage
if
[[
$CI
]]
;
then
bash <
(
curl
-s
https://codecov.io/bash
)
-f
profs/coverage
else
go tool cover
-html
=
profs/coverage
-o
=
coverage.html
go tool cover
-html
=
profs/coverage
-o
=
profs/
coverage.html
set
+x
echo
echo
"please open coverage.html to see detailed test coverage stats"
echo
"profiles are in ./prof/"
echo
"please open profs/coverage.html to see detailed test coverage stats"
fi
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment