get progress of calling method
<p>I need some advice.</p>

<p>I have a service class with a method which calls about 10 repositories methods. For example:</p>

<pre><code>public void serviceMethod() {
    repositoryMethod1();
    repositoryMethod2();
    repositoryMethod3();
    ....
}
</code></pre>

<p>Executing of service method takes a lot of time and I need to get a current progress of it in percentage.</p>

<p>I can log some info after every calling of repository methods. For example.</p>

<pre><code>public void serviceMethod() {
    repositoryMethod1();
    --log that 10% is completed
    repositoryMethod2();
    --log that 20% is completed
    ....
}
</code></pre>

<p>I think it is bad solution and I want to find the best one. Can somebody give me some advice?</p>

<p>I thought about AOP (advice for repository methods) but repository methods can be  called by another service and I don't know how to determine percentage. </p>