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

Difference in Instrumentation #77

Closed
grantwest opened this issue Jul 11, 2013 · 2 comments
Closed

Difference in Instrumentation #77

grantwest opened this issue Jul 11, 2013 · 2 comments
Assignees

Comments

@grantwest
Copy link

I have noticed that when instrumenting a file, instrumenting with File System mode results in different output than instrumenting with Server mode.

File System mode:
_$jscoverage['script.js']

Server Mode:
_$jscoverage['/script.js']

Notice the addition of the '/' in Server mode.

Based on what I have seen, it looks like the best fix would to be to change File System mode to also have the slash. (I could be very wrong)

I looked at trying to fix this myself, but I couldn't figure it out. The fact that this can happen suggests that there is some unnecessary code duplication somewhere. I also understand that I am probably the only person who this is affecting because of my unconventional use of the software, but I would be very appreciative if you fixed it.

Regards,
Grant

@ghost ghost assigned tntim96 Jul 11, 2013
@tntim96
Copy link
Owner

tntim96 commented Jul 11, 2013

I don't this is an issue, but it may be worth making it consistent. It is not occurring due to duplication or some code short-cut, it's just the implementation which can probably be easily changed.

The slash for web-server mode comes from the URI - line 444 of InstrumentingRequestHandler.java.

The URI for the file-system mode comes from line 399 of FileSystemInstrumenter.java.

I'll take a look.

@tntim96
Copy link
Owner

tntim96 commented Jul 11, 2013

OK - I've fixed this. Can you rebase and re-test?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants