Skip to content

Commit e7bc1bc

Browse files
committed
Merge branch 'main' into infra
2 parents 18fdf94 + 3a2a664 commit e7bc1bc

Some content is hidden

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

55 files changed

+1028432
-29539
lines changed

.github/workflows/build.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,17 @@ jobs:
1313

1414
strategy:
1515
matrix:
16-
os-type: [ubuntu-20.04]
16+
os-type: [ubuntu-latest]
1717
configuration: [Debug, Release, RelWithDebInfo]
1818

1919
steps:
2020
- uses: actions/checkout@v2
21+
- name: Install
22+
run: |
23+
sudo apt update
24+
sudo apt install gcc-13 g++-13
25+
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 100 --slave /usr/bin/g++ g++ /usr/bin/g++-13 --slave /usr/bin/gcov gcov /usr/bin/gcov-13
26+
sudo update-alternatives --set gcc /usr/bin/gcc-13
2127
- name: Configure
2228
working-directory: ${{github.workspace}}/src/wasm
2329
run: cmake -B ${{github.workspace}}/src/wasm/Build -DCMAKE_BUILD_TYPE=${{matrix.configuration}}

.github/workflows/jest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- uses: actions/checkout@v3
1717
- uses: mymindstorm/setup-emsdk@v11
1818
with:
19-
version: 3.1.31
19+
version: 3.1.44
2020
- name: Install modules
2121
run: npm i
2222
- name: Build

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
node-version: 18
1818
- uses: mymindstorm/setup-emsdk@v11
1919
with:
20-
version: 3.1.31
20+
version: 3.1.44
2121
- run: npm install -g npm@latest
2222
- run: npm ci
2323
- run: npm run build-publish-repo

.github/workflows/upload.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
steps:
1919
- uses: mymindstorm/setup-emsdk@v11
2020
with:
21-
version: 3.1.31
21+
version: 3.1.44
2222
- name: Checkout 🛎️
2323
uses: actions/checkout@v3
2424
- uses: actions/setup-node@v2

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,4 @@ dist/*
5353

5454
#Mac Temporary Files
5555
**/.DS_Store
56+
benchmark/ifcfiles/large.ifc.test

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM emscripten/emsdk:3.1.31
1+
FROM emscripten/emsdk:3.1.44
22
WORKDIR /web-ifc-app
33
COPY package*.json .
44
RUN npm i -g cpy-cli

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ These are the requirements needed to build web-ifc (only for those that wish to
7272

7373
1. Node v16 or later
7474
2. NPM v7 or later
75-
3. EMSCRIPTEN v3.1.27 or later
75+
3. EMSCRIPTEN v3.1.44 or later
7676
4. CMAKE v3.18 or later
7777

7878
## Building WASM module

benchmark.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
# System informations
2-
{"gpu":"","cpuName":"Apple M1","freeRam":18.25390625,"totalRam":8192}
2+
{"gpu":"","cpuName":"Apple M1","freeRam":85.890625,"totalRam":8192}
33
_________
4-
| filename | Size (mo) | Time to open model (ms) | Time to execute all (ms) | Total ifc entities | Total meshes | Total geometries | total errors |
4+
| filename | Size (mb) | Time to open model (ms) | Time to execute all (ms) | Total ifc entities | Total meshes | Total geometries | total errors |
55
|-------|-------|-------|-------|-------|-------|-------|-------|
6-
| ifcfiles/advanced_model.ifc.test | 33.67 | 428 | 2711 | 594374 | 6401 | 14120 | 0 |
7-
ifcfiles/dental_clinic.ifc.test | 12.4 | 243 | 1149 | 209259 | 2586 | 2626 | 176 |
8-
ifcfiles/example.ifc.test | 0.39 | 6 | 12 | 6487 | 115 | 119 | 0 |
9-
ifcfiles/tested_sample_project.ifc.test | 0.68 | 9 | 135 | 14119 | 93 | 98 | 0 |
6+
| ifcfiles/advanced_model.ifc.test | 33.67 | 279 | 2328 | 594374 | 6401 | 14120 | 0 |
7+
ifcfiles/dental_clinic.ifc.test | 12.4 | 97 | 1128 | 209259 | 2586 | 2626 | 176 |
8+
ifcfiles/example.ifc.test | 0.39 | 5 | 9 | 6487 | 115 | 119 | 0 |
9+
ifcfiles/large.ifc.test | 251.25 | 1562 | 5605 | 2153923 | 8701 | 9875 | 182 |
10+
ifcfiles/schependomlaan.ifc.test | 47 | 399 | 1045 | 714485 | 3569 | 3643 | 7296 |
11+
ifcfiles/tested_sample_project.ifc.test | 0.68 | 6 | 115 | 14119 | 93 | 98 | 0 |

benchmark/benchmark.ts

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,27 @@ class BenchmarkResultFormatter{
8888
}
8989
}
9090

91+
async function StreamFileToString(filename: string) {
92+
let stream = fs.createReadStream(filename);
93+
return new Promise((resolve, reject) => {
94+
const data:any = [];
95+
96+
stream.on('data', (chunk) => {
97+
data.push(chunk);
98+
});
99+
100+
stream.on('end', () => {
101+
resolve(Buffer.concat(data))
102+
})
103+
104+
stream.on('error', (err) => {
105+
reject(err)
106+
})
107+
108+
return data;
109+
})
110+
}
111+
91112
async function BenchmarkIfcFile(module: any, filename: string): Promise<FileResult>
92113
{
93114
let result = new FileResult();
@@ -97,7 +118,7 @@ async function BenchmarkIfcFile(module: any, filename: string): Promise<FileResu
97118
//let modelID = module.OpenModel("example.ifc", new Uint8Array(data.toString()));
98119

99120
const ifcFilePath = path.join(__dirname, './'+filename);
100-
const ifcFileContent = fs.readFileSync(ifcFilePath);
121+
const ifcFileContent = await StreamFileToString(ifcFilePath);
101122

102123
let startTime = ms();
103124
let modelID : number = module.OpenModel(ifcFileContent);
@@ -176,7 +197,7 @@ function generateMarkdownReport(systemInfo : SystemInfo, fileResult : Map<string
176197
let formatter = new BenchmarkResultFormatter();
177198
formatter.columns = {
178199
filename: "filename",
179-
fileSize: "Size (mo)",
200+
fileSize: "Size (mb)",
180201
timeTakenToOpenModel: "Time to open model (ms)",
181202
timeSuccess: "Time to execute all (ms)",
182203
numberOfIfcEntities: "Total ifc entities",

0 commit comments

Comments
 (0)