mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 16:28:12 -07:00
Compressed log work.
This commit is contained in:
parent
5cbb4e5f23
commit
22315abe08
1 changed files with 31 additions and 0 deletions
|
@ -282,6 +282,37 @@ class DynamicGraphExecutor<T>(val graph : DynamicGraph<T>, val factory: IThreadW
|
||||||
|
|
||||||
fun toSeconds(millis: Long) = (millis / 1000).toInt().toString()
|
fun toSeconds(millis: Long) = (millis / 1000).toInt().toString()
|
||||||
|
|
||||||
|
// class CompressedLog(val timestamp: Long, val threadMap: HashMap<Long, String>)
|
||||||
|
//
|
||||||
|
// fun compressLog(historyLog: List<HistoryLog>): ArrayList<CompressedLog> {
|
||||||
|
// val compressed = arrayListOf<CompressedLog>()
|
||||||
|
//
|
||||||
|
// var currentLog: CompressedLog? = null
|
||||||
|
//
|
||||||
|
// historyLog.forEach { hl ->
|
||||||
|
// if (currentLog == null) {
|
||||||
|
// currentLog = CompressedLog(hl.timestamp, hashMapOf(hl.threadId to hl.name))
|
||||||
|
// } else currentLog?.let { cl ->
|
||||||
|
// if (hl.timestamp - cl.timestamp < 1000) {
|
||||||
|
// cl.threadMap[hl.threadId] = hl.name
|
||||||
|
// } else {
|
||||||
|
// compressed.add(cl)
|
||||||
|
// currentLog = null
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// return compressed
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// compressLog(historyLog).forEach {
|
||||||
|
// val row = arrayListOf<String>()
|
||||||
|
// row.add(toSeconds(it.timestamp))
|
||||||
|
// it.threadMap.values.forEach {
|
||||||
|
// row.add(it)
|
||||||
|
// }
|
||||||
|
// table.addRow(row)
|
||||||
|
// }
|
||||||
|
|
||||||
val start = historyLog[0].timestamp
|
val start = historyLog[0].timestamp
|
||||||
val projectStart = ConcurrentHashMap<String, Long>()
|
val projectStart = ConcurrentHashMap<String, Long>()
|
||||||
historyLog.forEach { line ->
|
historyLog.forEach { line ->
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue