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

review feat: add the ability to follow the process of the creation of the Spoon model #2043

Merged
merged 6 commits into from
Jun 16, 2018

Conversation

tdurieux
Copy link
Collaborator

@tdurieux tdurieux commented Jun 8, 2018

fix #1778

I notice with this feature that printing the model is the slowest task.

JTD takes: 4794 ms
Spoon model: 4098 ms
Printing: 5507 ms

It surprised me

@tdurieux tdurieux changed the title feat: add the ability to follow the process of the creation of the Spoon model WIP feat: add the ability to follow the process of the creation of the Spoon model Jun 8, 2018
*/
public interface SpoonProgress {

enum PROCESS {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why not calling it Process?

* is called when a step in the precess is started
* @param process the current process
* @param task the task that has been processed
* @param taskId the task if
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think the end of the comment is missing ;)

@surli
Copy link
Collaborator

surli commented Jun 9, 2018

Is it ready?

@surli surli changed the title WIP feat: add the ability to follow the process of the creation of the Spoon model review feat: add the ability to follow the process of the creation of the Spoon model Jun 15, 2018
* @param taskId the task id
* @param nbTask the number of task in the process
*/
void step(Process process, String task, int taskId, int nbTask);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Am I wrong to say that everywhere in your usage, the task is in fact the filename of the file being processed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

for the moment it contains only the absolute path of the file.

Copy link
Collaborator

Choose a reason for hiding this comment

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

So don't you think that the parameter should be renamed then?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I mean: it's not the task, it's at best a description. The task itself is given by the process parameter.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

it is the task of the process.

MODEL,
IMPORT,
PROCESS,
PRINT
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't see in the diff the usage of PRINT? Shouldn't it used in DJPP?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

@@ -0,0 +1,43 @@
package spoon.support.compiler;
Copy link
Collaborator

Choose a reason for hiding this comment

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

The license header is missing. Could you add it please, else it will break the CI on master: merge with master and mvn license:format

@spoon-bot
Copy link
Collaborator

API changes: 2 (Detected by Revapi)

Old API: fr.inria.gforge.spoon:spoon-core:jar:6.3.0-20180616.095904-144 / New API: fr.inria.gforge.spoon:spoon-core:jar:6.3.0-SNAPSHOT

Method was added to an interface.
Old none
New method Environment#getSpoonProgress()
Breaking binary: non_breaking,
Method was added to an interface.
Old none
New method Environment#setSpoonProgress(SpoonProgress)
Breaking binary: non_breaking,

@surli surli merged commit a8ae146 into INRIA:master Jun 16, 2018
@surli surli mentioned this pull request Jun 25, 2018
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.

feature: Add Progress Listener for Model Building
3 participants