Skip to content

Commit

Permalink
feat-fix: recover docker construction
Browse files Browse the repository at this point in the history
  • Loading branch information
EagleoutIce committed May 11, 2024
1 parent 1db2422 commit 9385f2b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion scripts/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ COPY --from=builder /app/dist /app/dist

RUN rm -rf /app/**/tsconfig.tsbuildinfo

ENTRYPOINT ["node", "/app/dist/flowr.js"]
ENTRYPOINT ["node", "/app/dist/cli/flowr.js"]
5 changes: 3 additions & 2 deletions src/statistics/features/supported/assignments/assignments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { postProcess } from './post-process'
import type { RNodeWithParent } from '../../../../r-bridge/lang-4.x/ast/model/processing/decorate'
import { visitAst } from '../../../../r-bridge/lang-4.x/ast/model/processing/visitor'
import { RType } from '../../../../r-bridge/lang-4.x/ast/model/type'
import { AssignmentOperators } from '../../../../../test/functionality/_helper/provider'
import { OperatorDatabase, Operators } from '../../../../r-bridge/lang-4.x/ast/model/operators'


const initialAssignmentInfo = {
Expand All @@ -19,13 +19,14 @@ const initialAssignmentInfo = {

export type AssignmentInfo = Writable<typeof initialAssignmentInfo>

export const AssignmentOperators: ReadonlySet<string> = new Set(Operators.filter(op => OperatorDatabase[op].usedAs === 'assignment'))

function visitAssignment(info: AssignmentInfo, input: FeatureProcessorInput): void {
const assignmentStack: RNodeWithParent[] = []

visitAst(input.normalizedRAst.ast,
node => {
if(node.type !== RType.BinaryOp || !AssignmentOperators.includes(node.operator)) {
if(node.type !== RType.BinaryOp || !AssignmentOperators.has(node.operator)) {
return
}

Expand Down

3 comments on commit 9385f2b

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"artificial" Benchmark Suite

Benchmark suite Current: 9385f2b Previous: 1e5ddeb Ratio
Retrieve AST from R code 234.1720277727273 ms 305.50355490909095 ms 0.77
Normalize R AST 30.723291363636363 ms 33.04192136363636 ms 0.93
Produce dataflow information 56.350128363636365 ms 66.58585145454545 ms 0.85
Total per-file 1169.5232615 ms 1512.547620909091 ms 0.77
Static slicing 1.228541106989523 ms (1.042263974672524) 1.3817132831241319 ms (1.27303105869458) 0.89
Reconstruct code 0.36566704372093994 ms (0.2231737950442377) 0.45135141022522257 ms (0.25927254974160097) 0.81
Total per-slice 1.6125292461946816 ms (1.101872722170446) 1.8475447304133532 ms (1.3326721674469058) 0.87
failed to reconstruct/re-parse 0 # 0 # 1
times hit threshold 0 # 0 # 1
reduction (characters) 0.7721377633241837 # 0.7329390759026897 # 1.05
reduction (normalized tokens) 0.7469755213308832 # 0.7209834969577295 # 1.04

This comment was automatically generated by workflow using github-action-benchmark.

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"social-science" Benchmark Suite

Benchmark suite Current: 9385f2b Previous: 1e5ddeb Ratio
Retrieve AST from R code 240.53431966 ms 330.55613118 ms 0.73
Normalize R AST 31.79457412 ms 36.10837608 ms 0.88
Produce dataflow information 82.72933929999999 ms 188.6117503 ms 0.44
Total per-file 2667.385238 ms 3858.78617088 ms 0.69
Static slicing 5.216733304980188 ms (10.025431409128494) 8.763488287471356 ms (15.142795018273485) 0.60
Reconstruct code 0.3491781681214478 ms (0.19438688483846397) 0.6295735167403027 ms (0.28826473087031307) 0.55
Total per-slice 5.574694234130713 ms (10.094910005619147) 9.403718790030862 ms (15.25727767695505) 0.59
failed to reconstruct/re-parse 351 # 7 # 50.14
times hit threshold 483 # 298 # 1.62
reduction (characters) 0.916251146507461 # 0.8935817303062389 # 1.03
reduction (normalized tokens) 0.8803310839320097 # 0.8531248144961375 # 1.03

This comment was automatically generated by workflow using github-action-benchmark.

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark '"social-science" Benchmark Suite'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 2.

Benchmark suite Current: 9385f2b Previous: 1e5ddeb Ratio
failed to reconstruct/re-parse 351 # 7 # 50.14

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.