Skip to content

Instantly share code, notes, and snippets.

@tensiondriven
Created July 3, 2012 22:43
Show Gist options
  • Save tensiondriven/3043899 to your computer and use it in GitHub Desktop.
Save tensiondriven/3043899 to your computer and use it in GitHub Desktop.
Jonathan Yankovich
3:34 alright… here's my idea for this data layer
3:35 actually it was matts idea, heres my implementation:
3:35 New model with: Task, User, Timestamp, Sample Size, and Sample Value (duration)
3:35 So, a typical record might be User 1, Task 1, 1:00pm, 1 hour, 20 minutes
3:36 meaning between 1:00 − 2:00 pm, user 1 spent 20 minutes on task 1
3:36 These would be generated for a given slice of time, and for a given resolution
3:36 Ex, one report for totals for the whole day might have a sample size of one day (24 hours) with total time for that task in that one record
3:37 but if the user requests a more granular report, the systme would generate a series of records with 1 hour time slices, ie 24 records, 1 hour per record, where each record shows how much time was spent on that task in that time period
3:37 many records may be generated with 0 minutes as their actual duration
3:38 ie User 1, Task 1, 1:00pm, 1 hour, zero minutes (duration)
3:38 which makes quering a breeze, ie select * from datapoints where … order by timeslice
3:38 that should drastically simplify querying
3:39 and support reports of different resolutions
3:40 Whats another word for a time series data point?
3:42 Sample
3:42 i think that's waht im gonna call it
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment