I have some problems with the SourceGen process.
My ultimate goal is to find out how fast textGen is under different parameters for an exampleSolution. I also need to log those times and so that I can make some statistics.
The process would be : 1) change some things in the solution 2) invoke textGen 3) log the time it took
And that a few houndred or thousand times.
I tryed to build something like that by taking inspiration from the "TextPreviewModel" action , I basicily did put the whole code in a loop, and I write the files that are in the memory after the "textGenToMemory" to disk myself.
Now that works fine for the first iteration of the loop, but then the INSTANCE.get().openNewSession makes problems. I always get an Illegalte state exception. It seeems like that the old session is not done yet when I run into the second iteration of my loop. But I didnt find a way to wait for it to be done.
Someone knows a better way or can explain me how INSTANCE is to be used.