Skip to content

Commit 135a667

Browse files
Lakshmandhschall
authored andcommitted
Modified compression benchmark to use mongodb.
Signed-off-by: L Lakshmanan <[email protected]> Small edit to server.py Signed-off-by: Lakshman <Lakshman@localhost>
1 parent 07c700e commit 135a667

File tree

20 files changed

+3481
-12
lines changed

20 files changed

+3481
-12
lines changed

.gitattributes

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,9 @@ benchmarks/video-processing/videos/video4.mp4 filter=lfs diff=lfs merge=lfs -tex
2626
benchmarks/video-analytics-standalone/videos/default.mp4 filter=lfs diff=lfs merge=lfs -text
2727
benchmarks/video-analytics-standalone/videos/video1.mp4 filter=lfs diff=lfs merge=lfs -text
2828
benchmarks/video-analytics-standalone/videos/video2.mp4 filter=lfs diff=lfs merge=lfs -text
29+
benchmarks/compression/files/video2.mp4 filter=lfs diff=lfs merge=lfs -text
30+
benchmarks/compression/files/video1.mp4 filter=lfs diff=lfs merge=lfs -text
31+
benchmarks/compression/files/img4.jpg filter=lfs diff=lfs merge=lfs -text
32+
benchmarks/compression/files/img1.jpg filter=lfs diff=lfs merge=lfs -text
33+
benchmarks/compression/files/img2.jpg filter=lfs diff=lfs merge=lfs -text
34+
benchmarks/compression/files/img3.jpg filter=lfs diff=lfs merge=lfs -text

.github/workflows/e2e-compression.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@ jobs:
9797

9898
- name: start docker-compose benchmark
9999
run: |
100-
docker-compose -f ${{ env.YAML_DIR }}/dc-${{ matrix.service }}.yaml pull
101-
docker-compose -f ${{ env.YAML_DIR }}/dc-${{ matrix.service }}.yaml up &> log_file &
100+
docker compose -f ${{ env.YAML_DIR }}/dc-${{ matrix.service }}.yaml pull
101+
docker compose -f ${{ env.YAML_DIR }}/dc-${{ matrix.service }}.yaml up &> log_file &
102102
sleep 60s
103103
cat log_file
104104

benchmarks/compression/Dockerfile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,28 @@
2020
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2121
# SOFTWARE.
2222

23+
#---------- Init-Database -----------#
24+
# First stage (Builder):
25+
FROM vhiveease/golang-builder:latest AS databaseInitBuilder
26+
WORKDIR /app/app/
27+
RUN apt-get install git ca-certificates
28+
29+
COPY ./benchmarks/compression/init/go.mod ./
30+
COPY ./benchmarks/compression/init/go.sum ./
31+
COPY ./benchmarks/compression/init/init-database.go ./
32+
33+
RUN go mod tidy
34+
RUN CGO_ENABLED=0 GOOS=linux go build -v -o ./init-database init-database.go
35+
36+
# Second stage (Runner):
37+
FROM scratch as databaseInit
38+
WORKDIR /app/
39+
COPY --from=databaseInitBuilder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
40+
COPY --from=databaseInitBuilder /app/app/init-database .
41+
COPY ./benchmarks/compression/files/ ./files
42+
43+
ENTRYPOINT [ "/app/init-database" ]
44+
2345
#---------- PYTHON -----------#
2446
# First stage (Builder):
2547
# Install gRPC and all other dependencies

benchmarks/compression/Makefile

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,22 +21,31 @@
2121
# SOFTWARE.
2222

2323
ROOT = ../../
24-
FUNCTIONS = compression-python
24+
FUNCTIONS = compression-python init-database
2525
ALL_IMAGES = $(FUNCTIONS)
2626

2727
all-image: $(ALL_IMAGES)
2828

29-
compression-python: docker/Dockerfile python/server.py python/requirements.txt files/metamorphosis.txt
29+
compression-python: Dockerfile python/server.py python/requirements.txt files/metamorphosis.txt
3030
DOCKER_BUILDKIT=1 docker build \
3131
--tag vhiveease/compression-python:latest \
3232
--target compressionPython \
33-
-f docker/Dockerfile \
33+
-f ./Dockerfile \
34+
$(ROOT) --load
35+
36+
init-database: Dockerfile init/init-database.go files/metamorphosis.txt
37+
DOCKER_BUILDKIT=1 docker build \
38+
--tag vhiveease/compression-init-database:latest \
39+
--target databaseInit \
40+
-f ./Dockerfile \
3441
$(ROOT) --load
3542

3643
## Push images
3744
push:
3845
docker push docker.io/vhiveease/compression-python:latest
46+
docker push docker.io/vhiveease/compression-init-database:latest
3947

4048
## Pull images from docker hub
4149
pull:
4250
docker pull docker.io/vhiveease/compression-python:latest
51+
docker pull docker.io/vhiveease/compression-init-database:latest

0 commit comments

Comments
 (0)