2019-09-24 18:34:35 +00:00
|
|
|
from typing import Sequence
|
|
|
|
|
|
|
|
from jsonmodels.fields import StringField
|
|
|
|
from jsonmodels.models import Base
|
|
|
|
|
|
|
|
from apimodels import ListField, IntField, ActualEnumField
|
|
|
|
from bll.event.scalar_key import ScalarKeyEnum
|
|
|
|
|
|
|
|
|
|
|
|
class HistogramRequestBase(Base):
|
|
|
|
samples: int = IntField(default=10000)
|
|
|
|
key: ScalarKeyEnum = ActualEnumField(ScalarKeyEnum, default=ScalarKeyEnum.iter)
|
|
|
|
|
|
|
|
|
|
|
|
class ScalarMetricsIterHistogramRequest(HistogramRequestBase):
|
|
|
|
task: str = StringField(required=True)
|
|
|
|
|
|
|
|
|
|
|
|
class MultiTaskScalarMetricsIterHistogramRequest(HistogramRequestBase):
|
2020-02-04 16:12:30 +00:00
|
|
|
tasks: Sequence[str] = ListField(items_types=str, required=True)
|