Skip to content
New issue

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

Feature/208 historical data tab #218

Merged
merged 17 commits into from
Jan 31, 2024
Merged

Conversation

QW3RAT
Copy link
Contributor

@QW3RAT QW3RAT commented Jan 28, 2024

No description provided.

@QW3RAT QW3RAT marked this pull request as ready for review January 29, 2024 11:05
Copy link
Contributor

@lheimbs lheimbs left a comment

Choose a reason for hiding this comment

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

I keep getting this error:

java.util.NoSuchElementException: List is empty.
	at kotlin.collections.CollectionsKt___CollectionsKt.first(_Collections.kt:214)
	at com.amos.pitmutationmate.pitmutationmate.visualization.treestructure.HistoricalDataTable.createDataStructure(HistoricalDataTable.kt:93)
	at com.amos.pitmutationmate.pitmutationmate.visualization.treestructure.HistoricalDataTable.<init>(HistoricalDataTable.kt:38)
	at com.amos.pitmutationmate.pitmutationmate.ui.ToolWindowFactory$Util.initiateWithData(ToolWindowFactory.kt:52)
	at com.amos.pitmutationmate.pitmutationmate.ui.ToolWindowFactory.createToolWindowContent(ToolWindowFactory.kt:33)
	at com.intellij.openapi.wm.impl.ToolWindowImpl.createContentIfNeeded(ToolWindowImpl.kt:594)
	at com.intellij.openapi.wm.impl.ToolWindowImpl.getContentManager(ToolWindowImpl.kt:460)
	at com.amos.pitmutationmate.pitmutationmate.ui.ToolWindowFactory$Util.initiateWithData(ToolWindowFactory.kt:48)
	at com.amos.pitmutationmate.pitmutationmate.services.PluginCheckerService.fillToolWindow(PluginCheckerService.kt:121)
	at com.amos.pitmutationmate.pitmutationmate.services.PluginCheckerService.checkPlugins(PluginCheckerService.kt:61)
	at com.amos.pitmutationmate.pitmutationmate.activity.LaunchActivity.execute$lambda$2$lambda$0(LaunchActivity.kt:25)
	at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:209)
	at com.intellij.openapi.application.TransactionGuardImpl.access$100(TransactionGuardImpl.java:22)
	at com.intellij.openapi.application.TransactionGuardImpl$1.run(TransactionGuardImpl.java:191)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:843)
	at com.intellij.openapi.application.impl.ApplicationImpl$4.run(ApplicationImpl.java:463)
	at com.intellij.openapi.application.impl.RwLockHolder.runWithEnabledImplicitRead(RwLockHolder.kt:75)
	at com.intellij.openapi.application.impl.RwLockHolder.runWithImplicitRead(RwLockHolder.kt:67)
	at com.intellij.openapi.application.impl.ApplicationImpl.runWithImplicitRead(ApplicationImpl.java:1430)
	at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:82)
	at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:124)
	at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:44)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:792)
	at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:739)
	at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:733)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:761)
	at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.kt:695)
	at com.intellij.ide.IdeEventQueue._dispatchEvent$lambda$12(IdeEventQueue.kt:589)
	at com.intellij.openapi.application.impl.RwLockHolder.runWithoutImplicitRead(RwLockHolder.kt:44)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.kt:589)
	at com.intellij.ide.IdeEventQueue.access$_dispatchEvent(IdeEventQueue.kt:72)
	at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:355)
	at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:354)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:793)
	at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:354)
	at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:349)
	at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$1(IdeEventQueue.kt:1014)
	at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:106)
	at com.intellij.ide.IdeEventQueueKt.performActivity(IdeEventQueue.kt:1014)
	at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$7(IdeEventQueue.kt:349)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:848)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.kt:391)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92)

Copy link
Contributor

@nikomall34 nikomall34 left a comment

Choose a reason for hiding this comment

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

I also get the same error as Lennart

// useInMemoryPgpKeys(signingKey, signingPassword)
// }
// sign(publishing.publications)
// }
Copy link
Contributor

Choose a reason for hiding this comment

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

Please remove the comments here

@QW3RAT
Copy link
Contributor Author

QW3RAT commented Jan 30, 2024

The error should not occur anymore. Atm there is a bug within the histricalDataTable if at the startup of the IDE there is no saved run in the history. I think it has to do with the order in which the runArchiver and the visualisation gets callled

@lheimbs
Copy link
Contributor

lheimbs commented Jan 30, 2024

Also please consider adding some tests for the data retrieval part...

@QW3RAT QW3RAT force-pushed the Feature/208-Historical-data-tab branch from 172ccbc to 37465fe Compare January 30, 2024 18:48
@QW3RAT
Copy link
Contributor Author

QW3RAT commented Jan 30, 2024

Addressed the requested changes made by @lheimbs and @nikomall34

@lheimbs
Copy link
Contributor

lheimbs commented Jan 30, 2024

The displaying of the historical data seems very brittle. In the history folder are 2 results present but no history is shown in the tool window:
image

Copy link
Contributor

@nikomall34 nikomall34 left a comment

Choose a reason for hiding this comment

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

You need to update the HistoryTable in the ToolWindowFactory.updateReport function like I did it with PackageBreakdownTable

if (packageNode != null) {
createReportDataNode(report.fileName, report)?.let { packageNode.children.add(it) }
}
if (packageNode != null) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This "if" is not necessary. You can merge it with the one above.

# Conflicts:
#	pitmutationmate/src/main/kotlin/com/amos/pitmutationmate/pitmutationmate/services/ReportPathGeneratorService.kt
@QW3RAT QW3RAT force-pushed the Feature/208-Historical-data-tab branch from aef7829 to 3a5532c Compare January 31, 2024 09:24
Copy link
Contributor

@lheimbs lheimbs left a comment

Choose a reason for hiding this comment

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

Okay works for me as required in the ticket.

I think we are missing an opportunity for better historical data here by only ever showing the newest run for a specific class because as a developer trying to improve my tests it would be helpful to see if things are improving/declining over time...

@QW3RAT QW3RAT merged commit 001377b into main Jan 31, 2024
15 checks passed
@QW3RAT QW3RAT deleted the Feature/208-Historical-data-tab branch January 31, 2024 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants