We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Quick and dirty (and broken) prototype for ./dumpling.sh groovy -s ./script lhs rhs:
./dumpling.sh groovy -s ./script lhs rhs
bfr = D.load.threaddump(D.args[0]) aft = D.load.threaddump(D.args[1]) bt = bfr.threads at = aft.threads terminated = bt.derive(bt.getThreadsAsSet() - at.getThreadsAsSet()) created = at.derive(at.getThreadsAsSet() - bt.getThreadsAsSet()) if (!terminated.empty) { println "Terminated threads" println terminated } if (!created.empty) { println "Created threads" println created } lhs = bt.derive(bt.getThreadsAsSet() - terminated.getThreadsAsSet()) rhs = at.derive(at.getThreadsAsSet() - created.getThreadsAsSet()) def stale = [] def modified = [:] lhs.each { l -> r = rhs.grep { it.id == l.id } if (l.toString().equals(r.toString())) { stale << l } else { modified[l] = r; } } if (!stale.empty) { println "Stale threads" println stale } if (!modified.empty) { println "Modified threads" lined = modified.collect { l, r -> [ l.toString().split('\n'), r.toString().split('\n') ] } lcol = 0; rcol = 0; lined.each { l, r -> l.each { lcol = Math.max(lcol, it.length()) } r.each { rcol = Math.max(rcol, it.length()) } } lined.each { l, r -> end = Math.max(l.length, r.length) for (int i = 0; i < end; i++) { lv = l[i] rv = r[i] sep = (lv == rv ? ' | ' : '<=>') println "${lv.padRight(lcol)}\t$sep\t${rv.padRight(rcol)}" } println "" } } return 0;
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Quick and dirty (and broken) prototype for
./dumpling.sh groovy -s ./script lhs rhs
:The text was updated successfully, but these errors were encountered: