Skip to content

Commit

Permalink
Compare Typescript scans in separate path finding plots
Browse files Browse the repository at this point in the history
  • Loading branch information
JohT committed Sep 22, 2024
1 parent 8daed16 commit dc1a834
Show file tree
Hide file tree
Showing 5 changed files with 441 additions and 148 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,14 @@ UNWIND sourcesAndTargets AS sourceAndTarget
// Optionally get the project (e.g. Java Artifact, Typescript Project) the source and target belong to
OPTIONAL MATCH (sourceProject:Artifact|Project)-[:CONTAINS]->(source)
OPTIONAL MATCH (targetProject:Artifact|Project)-[:CONTAINS]->(target)
// Optionally get the name of the scan that contained that project
OPTIONAL MATCH (sourceScan:TS:Scan)-[:CONTAINS_PROJECT]->(sourceProject)
OPTIONAL MATCH (targetScan:TS:Scan)-[:CONTAINS_PROJECT]->(targetProject)
// Group by project name, if the target project is the same and the distance. Return those as result.
RETURN sourceProject.name AS sourceProject
,sourceScan.name AS sourceScan
,(targetProject <> sourceProject) AS isDifferentTargetProject
,(targetScan <> sourceScan) AS isDifferentTargetScan
,distance
,distanceTotalPairCount
,distanceTotalSourceCount
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,14 @@ UNWIND sourcesAndTargets AS sourceAndTarget
// Optionally get the project (e.g. Java Artifact, Typescript Project) the source and target belong to
OPTIONAL MATCH (sourceProject:Artifact|Project)-[:CONTAINS]->(source)
OPTIONAL MATCH (targetProject:Artifact|Project)-[:CONTAINS]->(target)
// Optionally get the name of the scan that contained that project
OPTIONAL MATCH (sourceScan:TS:Scan)-[:CONTAINS_PROJECT]->(sourceProject)
OPTIONAL MATCH (targetScan:TS:Scan)-[:CONTAINS_PROJECT]->(targetProject)
// Group by project name, if the target project is the same and the distance. Return those as result.
RETURN sourceProject.name AS sourceProject
,sourceScan.name AS sourceScan
,(targetProject <> sourceProject) AS isDifferentTargetProject
,(targetScan <> sourceScan) AS isDifferentTargetScan
,distance
,distanceTotalPairCount
,distanceTotalSourceCount
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

MATCH (typescriptScan:TS:Scan)
WITH typescriptScan
,replace(reverse(split(reverse(typescriptScan.fileName), '/')[0]), '.json', '') AS scanName
,reverse(split(reverse(split(typescriptScan.fileName, '/.reports/')[0]), '/')[0]) AS scanName
SET typescriptScan.name = scanName
RETURN count(*) AS numberOfNamesScans
RETURN count(*) AS numberOfNamesScans
// Debugging
//RETURN scanName, scanNameOld, typescriptScan.fileName
Loading

0 comments on commit dc1a834

Please sign in to comment.