patrickmoore / Mu

Mu Releases
104 stars 22 forks source link

Issues importing merged IBT files from VRS #10

Open yanongena opened 6 years ago

yanongena commented 6 years ago

Our engineers have issues importing IBT files from VRS. In VRS you have the option to splice IBT files so they upload easier. After the session, the VRS software merges the IBT again however they add some data at the beginning of the Session string.

I had the same issue while implementing my own tool for the team. The fix is rather simple...

When VRS merges the IBT, they add following to the session YAML:

` ---

VRS-TelemetryLogger: 0.0.65.0

SessionStartTime: 1523796974

---`

Because in YAML the --- is a new document, it might look like the session string is empty and doesn't contain the information to grab the driver ID and so on.

The fix that i implemented was just to count the amount of documents in the session string and if it was higher than 2 I would know the actual session string is in the second document and not first.

Here's my implementation in C#:

`string sessionString = new string(chars);

string[] docs = sessionString.Split(new string[] { "---" }, StringSplitOptions.None);

if(docs.Length == 3) {

   sessionString = "---" + docs[2];

}`

Would be good if Mu implements something similar so merged IBT files from VRS can be parsed.

I also mentioned this to the devs of VRS who might fix it however he couldn't commit a timeframe and it won't fix past IBT files.

patrickmoore commented 6 years ago

This really is an issue with VRS not conforming to how ibt files are supposed to be. I'm hesitant in adding special cases to Mu to fix issues caused by other utilities. I'll have to think about more about this.