src/Pure/ML/ml_statistics.scala
changeset 65854 db070951dfee
parent 65851 c103358a5559
child 65855 33b3e76114f8
equal deleted inserted replaced
65853:cf24cc0b0a47 65854:db070951dfee
    19 object ML_Statistics
    19 object ML_Statistics
    20 {
    20 {
    21   /* content interpretation */
    21   /* content interpretation */
    22 
    22 
    23   final case class Entry(time: Double, data: Map[String, Double])
    23   final case class Entry(time: Double, data: Map[String, Double])
       
    24   {
       
    25     def heap_size: Long = data.getOrElse("size_heap", 0.0).toLong
       
    26   }
    24 
    27 
    25   def apply(ml_statistics: List[Properties.T], heading: String = ""): ML_Statistics =
    28   def apply(ml_statistics: List[Properties.T], heading: String = ""): ML_Statistics =
    26     new ML_Statistics(ml_statistics, heading)
    29     new ML_Statistics(ml_statistics, heading)
    27 
    30 
    28   val empty = apply(Nil)
    31   val empty = apply(Nil)
   108       result += ML_Statistics.Entry(time, data)
   111       result += ML_Statistics.Entry(time, data)
   109     }
   112     }
   110     result.toList
   113     result.toList
   111   }
   114   }
   112 
   115 
       
   116   def heap_size_max: Long =
       
   117     (0L /: content)({ case (m, entry) => m max entry.heap_size })
       
   118 
   113 
   119 
   114   /* charts */
   120   /* charts */
   115 
   121 
   116   def update_data(data: XYSeriesCollection, selected_fields: Iterable[String])
   122   def update_data(data: XYSeriesCollection, selected_fields: Iterable[String])
   117   {
   123   {