M
MJ
Hello, I need some suggestions on how to do this.
I am reading through a large iis loge. For each line, I get three datapoints
(sessionID, Time, Stage). I need to store these values into some collection,
but not sure which one. Here is how they are related.
For each sessionID, there is one or more Time points. For each Time point
related to the sessionID, there is one Stage.
So we could have somehting like this:
Sid, Time, Stage
123, 12:00, search
543, 12:00, addToCart
123, 12:01, addToWishlist
657, 12:03, fillForm
123, 12:06, logIn
543, 12:06, logOut
In the end, I need this:
Sid: 123
search->addToWishlist->logIn
Sid: 543
addToCart->logOut
Sid: 657
fillForm
What I want to do is use the Time to sort the stages in order that the user
performed the steps. I'm up to the point where I looping through each line
of the log and then use regular expressions to get the 3 data points. Now
how should I store them? Something tells me a hashTable is the way to go,
but I don't know how to implement it using 3 data points. I think Sid+Time
should be the unique key with the stage being the value for the hash.
So far I've tried creating two hashTables (X,Y). X has Time as key and stage
was value. Y has SessionID as key and X as value, but this isn't working
because Time is not unique since other users are doing stuff at the same
time.
Any suggestions?
I am reading through a large iis loge. For each line, I get three datapoints
(sessionID, Time, Stage). I need to store these values into some collection,
but not sure which one. Here is how they are related.
For each sessionID, there is one or more Time points. For each Time point
related to the sessionID, there is one Stage.
So we could have somehting like this:
Sid, Time, Stage
123, 12:00, search
543, 12:00, addToCart
123, 12:01, addToWishlist
657, 12:03, fillForm
123, 12:06, logIn
543, 12:06, logOut
In the end, I need this:
Sid: 123
search->addToWishlist->logIn
Sid: 543
addToCart->logOut
Sid: 657
fillForm
What I want to do is use the Time to sort the stages in order that the user
performed the steps. I'm up to the point where I looping through each line
of the log and then use regular expressions to get the 3 data points. Now
how should I store them? Something tells me a hashTable is the way to go,
but I don't know how to implement it using 3 data points. I think Sid+Time
should be the unique key with the stage being the value for the hash.
So far I've tried creating two hashTables (X,Y). X has Time as key and stage
was value. Y has SessionID as key and X as value, but this isn't working
because Time is not unique since other users are doing stuff at the same
time.
Any suggestions?