Skip to content

Commit f6e81c9

Browse files
authored
refactor oopsla2024-benchmarks (#189)
1 parent 397d519 commit f6e81c9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+91
-1707
lines changed

.gitignore

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ cedar-java-hello-world/.gradle/*
1616
cedar-java-hello-world/build/*
1717
cedar-java-hello-world/.jqwik-database
1818

19-
# Don't check build files for cedar-rust-hello-world
19+
# Don't check cargo build artifacts
2020
cedar-rust-hello-world/Cargo.lock
2121
cedar-rust-hello-world/target/*
22-
23-
# Don't check build files for tinytodo
22+
oopsla2024-benchmarks/Cargo.lock
23+
oopsla2024-benchmarks/target/*
2424
tinytodo/Cargo.lock
2525
tinytodo/target/*
2626

oopsla2024-benchmarks/Dockerfile

+9-6
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,20 @@ RUN cargo install cedar-policy-cli@3.0.1
3333
WORKDIR /
3434
COPY Cargo.toml plot.py README.md cedar-benchmarks/
3535
COPY generators cedar-benchmarks/generators/
36-
COPY openfga-examples cedar-benchmarks/openfga-examples/
36+
COPY benches cedar-benchmarks/benches/
3737
COPY src cedar-benchmarks/src/
38-
COPY tinytodo cedar-benchmarks/tinytodo/
38+
COPY rego-harness cedar-benchmarks/rego-harness/
3939
COPY validate_all_benchmarks.sh cedar-benchmarks
4040

41-
## Build Rego version of TinyTodo
42-
RUN cd cedar-benchmarks/tinytodo/rego && \
43-
go mod init TinyTodoRego && \
41+
## Check that the Cedar policies validate with the provided schemas
42+
RUN BENCHES=cedar-benchmarks/benches cedar-benchmarks/validate_all_benchmarks.sh
43+
44+
## Build Rego harness
45+
RUN cd cedar-benchmarks/rego-harness && \
46+
go mod init rego-harness && \
4447
go get github.com/open-policy-agent/opa/rego && \
4548
mkdir -p build/bin && \
46-
go build -o build/bin/tinytodo cmd/tinytodo/main.go
49+
go build -o build/bin/main cmd/harness/main.go
4750

4851
## Build benchmark harness so it's ready
4952
WORKDIR /cedar-benchmarks

oopsla2024-benchmarks/README.md

+20-6
+4

oopsla2024-benchmarks/openfga-examples/README.md

-15
This file was deleted.

oopsla2024-benchmarks/openfga-examples/gdrive-templates/allow_requests/1.json

-6
This file was deleted.

oopsla2024-benchmarks/openfga-examples/gdrive-templates/allow_requests/2.json

-6
This file was deleted.

oopsla2024-benchmarks/openfga-examples/gdrive-templates/allow_requests/3.json

-6
This file was deleted.

oopsla2024-benchmarks/openfga-examples/gdrive-templates/allow_requests/4.json

-6
This file was deleted.

oopsla2024-benchmarks/openfga-examples/gdrive-templates/deny_requests/5.json

-6
This file was deleted.

oopsla2024-benchmarks/openfga-examples/gdrive-templates/deny_requests/6.json

-6
This file was deleted.

oopsla2024-benchmarks/openfga-examples/gdrive-templates/deny_requests/7.json

-6
This file was deleted.

oopsla2024-benchmarks/openfga-examples/gdrive-templates/deny_requests/8.json

-6
This file was deleted.

oopsla2024-benchmarks/openfga-examples/gdrive-templates/entities.json

-111
This file was deleted.

oopsla2024-benchmarks/openfga-examples/gdrive-templates/linked

-18
This file was deleted.

oopsla2024-benchmarks/openfga-examples/gdrive/allow_requests/1.json

-6
This file was deleted.

oopsla2024-benchmarks/openfga-examples/gdrive/allow_requests/2.json

-6
This file was deleted.

oopsla2024-benchmarks/openfga-examples/gdrive/allow_requests/3.json

-6
This file was deleted.

oopsla2024-benchmarks/openfga-examples/gdrive/allow_requests/4.json

-6
This file was deleted.

oopsla2024-benchmarks/openfga-examples/gdrive/deny_requests/5.json

-6
This file was deleted.

oopsla2024-benchmarks/openfga-examples/gdrive/deny_requests/6.json

-6
This file was deleted.

oopsla2024-benchmarks/openfga-examples/gdrive/deny_requests/7.json

-6
This file was deleted.

oopsla2024-benchmarks/openfga-examples/gdrive/deny_requests/8.json

-6
This file was deleted.

0 commit comments

Comments
 (0)