Documentation ¶
Index ¶
- Constants
- type CondorMainEachDetailedRequest
- type CondorSiteCpuEff
- type CondorTierEfficiencies
- type CondorWfCpuEff
- type Configuration
- type DTReqColumn
- type DTReqOrder
- type DTReqSearch
- type DataSourceTS
- type DataTableRequest
- type DatatableBaseResponse
- type ExternalLinks
- type MongoCollectionNames
- type SearchBuilderRequest
- type ServerInfoResp
- type ShortUrl
- type ShortUrlRequest
- type SingleCriteria
- type StepchainRowDetailRequest
- type StepchainTask
- type StepchainTaskWithCmsrunJobtype
- type StepchainTaskWithCmsrunJobtypeSite
- type StringArray
Constants ¶
const ( Condor string = "condor" Stepchain = "stepchain" )
string mapping
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CondorMainEachDetailedRequest ¶
type CondorMainEachDetailedRequest struct { Type string `json:"Type" validate:"required" binding:"required"` Workflow string `json:"Workflow" validate:"required" binding:"required"` WmagentRequestName string `json:"WmagentRequestName"` CpuEffOutlier int64 `json:"CpuEffOutlier"` }
CondorMainEachDetailedRequest accepts Type, Workflow, WmagentRequestName, CpuEffOutlier and returns this workflow's site details
type CondorSiteCpuEff ¶
type CondorSiteCpuEff struct { Links template.HTML `bson:"Links,omitempty"` // not belongs to actual data but required for carrying links to datatable response Type string `bson:"Type,omitempty" validate:"required"` Workflow string `bson:"Workflow,omitempty" validate:"required"` WmagentRequestName string `bson:"WmagentRequestName,omitempty"` Site string `bson:"Site,omitempty"` Tier string `bson:"Tier,omitempty"` CpuEffOutlier int64 `bson:"CpuEffOutlier,omitempty" validate:"required"` CpuEff float64 `bson:"CpuEff,omitempty" validate:"required"` NonEvictionEff float64 `bson:"NonEvictionEff,omitempty" validate:"required"` EvictionAwareEffDiff float64 `bson:"EvictionAwareEffDiff,omitempty" validate:"required"` ScheduleEff float64 `bson:"ScheduleEff,omitempty" validate:"required"` CmsswReadTimePercentage float64 `bson:"CmsswReadTimePercentage"` Cpus int64 `bson:"Cpus,omitempty" validate:"required"` CpuTimeHr float64 `bson:"CpuTimeHr,omitempty" validate:"required"` WallClockHr float64 `bson:"WallClockHr,omitempty" validate:"required"` CoreTimeHr float64 `bson:"CoreTimeHr,omitempty" validate:"required"` CommittedCoreHr float64 `bson:"CommittedCoreHr,omitempty" validate:"required"` CommittedWallClockHr float64 `bson:"CommittedWallClockHr,omitempty" validate:"required"` WastedCpuTimeHr float64 `bson:"WastedCpuTimeHr,omitempty" validate:"required"` CommittedOverMaxWallTimeAvg float64 `bson:"CommittedOverMaxWallTimeAvg,omitempty" validate:"required"` Schedds StringArray `bson:"Schedds"` MaxWmagentJobId string `bson:"MaxWmagentJobId"` }
CondorSiteCpuEff Condor site level cpu efficiency entry
type CondorTierEfficiencies ¶
type CondorTierEfficiencies struct { Tier string `json:"Tier" validate:"required" binding:"required"` Type string `json:"Type" validate:"required" binding:"required"` TierCpuEff float64 `json:"TierCpuEff" validate:"required" binding:"required"` TierCpus float64 `json:"TierCpus" validate:"required" binding:"required"` TierCpuTimeHr float64 `json:"TierCpuTimeHr" validate:"required" binding:"required"` TierWallClockHr float64 `json:"TierWallClockHr" validate:"required" binding:"required"` }
CondorTierEfficiencies tier efficiencies
type CondorWfCpuEff ¶
type CondorWfCpuEff struct { Links template.HTML `bson:"Links,omitempty"` // not belongs to actual data but required for carrying links to datatable response Type string `bson:"Type,omitempty" validate:"required"` Workflow string `bson:"Workflow,omitempty" validate:"required"` WmagentRequestName string `bson:"WmagentRequestName,omitempty"` CpuEffOutlier int64 `bson:"CpuEffOutlier,omitempty" validate:"required"` CpuEff float64 `bson:"CpuEff,omitempty" validate:"required"` NonEvictionEff float64 `bson:"NonEvictionEff,omitempty" validate:"required"` EvictionAwareEffDiff float64 `bson:"EvictionAwareEffDiff,omitempty" validate:"required"` ScheduleEff float64 `bson:"ScheduleEff,omitempty" validate:"required"` CmsswReadTimePercentage float64 `bson:"CmsswReadTimePercentage"` Cpus int64 `bson:"Cpus,omitempty" validate:"required"` CpuTimeHr float64 `bson:"CpuTimeHr,omitempty" validate:"required"` WallClockHr float64 `bson:"WallClockHr,omitempty" validate:"required"` CoreTimeHr float64 `bson:"CoreTimeHr,omitempty" validate:"required"` CommittedCoreHr float64 `bson:"CommittedCoreHr,omitempty" validate:"required"` CommittedWallClockHr float64 `bson:"CommittedWallClockHr,omitempty" validate:"required"` WastedCpuTimeHr float64 `bson:"WastedCpuTimeHr,omitempty" validate:"required"` CommittedOverMaxWallTimeAvg float64 `bson:"CommittedOverMaxWallTimeAvg,omitempty" validate:"required"` CpuEffT1T2 float64 `bson:"CpuEffT1T2,omitempty" validate:"required"` CpusT1T2 int64 `bson:"CpusT1T2,omitempty" validate:"required"` CpuTimeHrT1T2 float64 `bson:"CpuTimeHrT1T2,omitempty" validate:"required"` WallClockHrT1T2 float64 `bson:"WallClockHrT1T2,omitempty" validate:"required"` CoreTimeHrT1T2 float64 `bson:"CoreTimeHrT1T2,omitempty" validate:"required"` WastedCpuTimeHrT1T2 float64 `bson:"WastedCpuTimeHrT1T2,omitempty" validate:"required"` }
CondorWfCpuEff Condor workflow level cpu efficiency entry
type Configuration ¶
type Configuration struct { Verbose int `json:"verbose"` // verbosity level {0: warn, 1: info, 2: debug, 3: detailed debug} IsTest bool `json:"is_test"` // if the app is test run, sets "localhost:PORT" instead of ":PORT" Port int `json:"port"` // web service port number EnvFile string `json:"env_file"` // secret environment file path for MongoDD connection credentials ReadTimeout int `json:"read_timeout"` // web service read timeout in sec WriteTimeout int `json:"write_timeout"` // web service write timeout in sec MongoConnectionTimeout int `json:"mongo_connection_timeout"` // mongo connection timeout in sec BaseEndpoint string `json:"base_endpoint"` // base_endpoint of web service CollectionNames MongoCollectionNames `json:"collection_names"` // mongodb collection names ExternalLinks ExternalLinks `json:"external_links"` // external links }
Configuration stores configuration parameters
func (*Configuration) String ¶
func (c *Configuration) String() string
String returns string representation of cpueff Config
type DTReqColumn ¶
type DTReqColumn struct { Data string `json:"data"` // Column name Name string `json:"name"` // Column name to be used in page if it is different from source data Searchable bool `json:"searchable"` // Orderable bool `json:"orderable"` // Search DTReqSearch `json:"search"` // If client requested search against individual column }
DTReqColumn represents client column selections like; sort order, search text for that column
type DTReqOrder ¶
type DTReqOrder struct { Column int `json:"column"` // Column index number in the columns list (order not changes) Dir string `json:"dir" binding:"oneof=asc desc"` // asc or desc }
DTReqOrder represents the selected column direction.
type DTReqSearch ¶
DTReqSearch represents main search text which client entered and can be regex or not.
In default in this service, all search text will be behaved as "REGEX" instead of fuzzy search. TODO separate regex and fuzzy search by providing option in the frontend
type DataSourceTS ¶
type DataSourceTS struct { Id primitive.ObjectID `bson:"_id"` // do not send in the json StartDate string `bson:"startDate,omitempty" validate:"required"` EndDate string `bson:"endDate,omitempty" validate:"required"` }
DataSourceTS struct contains data production time means; alas Spark job time period
type DataTableRequest ¶
type DataTableRequest struct { Draw int `json:"draw" validate:"required" binding:"required"` // Just a counter that should be return exactly in the response Columns []DTReqColumn `json:"columns" validate:"required" binding:"required"` // Includes user input for columns (like search text for the column) Length int64 `json:"length"` // Number of records that the table can display in the current draw. Orders []DTReqOrder `json:"order"` // Start int64 `json:"start"` // SearchBuilderRequest SearchBuilderRequest `json:"searchBuilderRequest"` // SearchBuilderRequest (custom addition to DataTables request object) }
DataTableRequest main ajax request that come from DataTable, which includes user inputs
For full field descriptions, please see https://datatables.net/manual/server-side#Sent-parameters
func (*DataTableRequest) String ¶
func (r *DataTableRequest) String() string
String returns string representation of DataTableRequest
type DatatableBaseResponse ¶
type DatatableBaseResponse struct { Draw int `json:"draw" validate:"required"` // The value that came in DataTable request, same should be returned RecordsTotal int64 `json:"recordsTotal" validate:"required"` // Total records which will be showed in the footer RecordsFiltered int64 `json:"recordsFiltered" validate:"required"` // Filtered record count which will be showed in the footer Data interface{} `json:"data" validate:"required"` // Data }
DatatableBaseResponse represents JQuery DataTables response format
type ExternalLinks ¶
type ExternalLinks struct { StrStartDate string `json:"str_start_date"` // replace string of str_start_date StrStartDateMsec string `json:"str_start_date_msec"` // replace string of str_start_date_msec StrEndDate string `json:"str_end_date"` // replace string of str_end_date StrEndDateMsec string `json:"str_end_date_msec"` // replace string of str_end_date_msec StrWorkflow string `json:"str_workflow"` // replace string of str_workflow StrWmagentRequestName string `json:"str_wmagent_request_name"` // replace string of str_wmagent_request_name StrSite string `json:"str_site"` // replace string of str_wmagent_request_name StrJobType string `json:"str_job_type"` // replace string of str_job_type stepchain StrJobState string `json:"str_job_state"` // replace string of str_job_state stepchain StrTaskName string `json:"str_task_name"` // replace string of str_task_name stepchain StrTaskNamePrefix string `json:"str_task_name_prefix"` // replace string of str_task_name_prefix stepchain LinkMonteCarloManagement string `json:"link_monte_carlo_management"` // link of string of link_monte_carlo_management LinkEsCms string `json:"link_es_cms"` // link of string of link_es_cms LinkEsCmsWithSite string `json:"link_es_cms_with_site"` // link of string of link_es_cms_with_site LinkGrafana string `json:"link_grafana"` // link of string of link_grafana LinkGrafanaWithSite string `json:"link_grafana_with_site"` // link of string of link_grafana_with_site LinkDmytroProdMon string `json:"link_dmytro_prod_mon"` // link of string of link_dmytro_prod_mon LinkUnifiedReport string `json:"link_unified_report"` // link of string of link_unified_logs LinkEsWmarchive string `json:"link_es_wmarchive"` // link of string of link_es_wmarchive stepchain LinkEsWmarchiveJobType string `json:"link_es_wmarchive_jobtype"` // link of string of link_es_wmarchive_jobtype stepchain LinkReqMgr string `json:"link_reqmgr"` // link of string of link_reqmgr stepchain }
ExternalLinks mongo collection names struct
type MongoCollectionNames ¶
type MongoCollectionNames struct { CondorMainWorkflows string `json:"condor_main"` // condor main wf cpu efficiencies collection name CondorDetailed string `json:"condor_detailed"` // condor detailed wf site cpu efficiencies collection name CondorTiers string `json:"condor_tiers"` // condor tiers wf site cpu efficiencies collection name ScTask string `json:"sc_task"` // Stepchain Task cpu efficiencies collection name ScTaskCmsrun string `json:"sc_task_cmsrun"` // Stepchain Task, CmsRun details cpu efficiencies collection name ScTaskCmsrunJobtype string `json:"sc_task_cmsrun_jobtype"` // Stepchain Task, CmsRun, JobType details cpu efficiencies collection name ScTaskCmsrunJobtypeSite string `json:"sc_task_cmsrun_jobtype_site"` // Stepchain Task, CmsRun, JobType, Site details cpu efficiencies collection name ShortUrl string `json:"short_url"` // short_url collection name DatasourceTimestamp string `json:"datasource_timestamp"` // datasource_timestamp collection name }
MongoCollectionNames mongo collection names struct
type SearchBuilderRequest ¶
type SearchBuilderRequest struct { Criteria []SingleCriteria `json:"criteria,omitempty"` Logic string `json:"logic,omitempty"` // There are "OR" and "AND" options. InputCondorWorkflow string `json:"inputCondorWorkflow,omitempty"` // Main search bar entry for wf InputCondorWmaReqName string `json:"inputCondorWmaReqName,omitempty"` // Main search bar entry for WMAgent_RequestName InputScTask string `json:"inputScTask,omitempty"` // Main search bar entry for SC task name InputScSite string `json:"inputScSite,omitempty"` // Main search bar entry for SC task name }
SearchBuilderRequest datatables search builder request format
func (*SearchBuilderRequest) GetPrettyURL ¶
func (r *SearchBuilderRequest) GetPrettyURL() string
func (*SearchBuilderRequest) String ¶
func (r *SearchBuilderRequest) String() string
String returns string representation of cpueff SearchBuilderRequest
type ServerInfoResp ¶
ServerInfoResp custom response struct for service information
type ShortUrl ¶
type ShortUrl struct { HashId string `bson:"hashId,omitempty" validate:"required"` Page string `bson:"page" validate:"required"` // Page name: main, detailed, etc. Request DataTableRequest `bson:"dtRequest,omitempty" validate:"required"` SavedState map[string]interface{} `bson:"savedState"` // Saved state of datatables }
ShortUrl struct is used for key:value couples of unique id and datatables request
type ShortUrlRequest ¶
type ShortUrlRequest struct { Page string `json:"page"` Request DataTableRequest `json:"dtRequest"` SavedState map[string]interface{} `json:"savedState"` }
ShortUrlRequest represents short url incoming request that will be fired from client
func (*ShortUrlRequest) String ¶
func (r *ShortUrlRequest) String() string
String returns string representation of ShortUrlRequest
type SingleCriteria ¶
type SingleCriteria struct { // "contains" renamed as "regex" in the page and regex search will be applied Condition string `json:"condition,omitempty"` // Column display name Data string `json:"data,omitempty"` // Actual column name OrigData string `json:"origData,omitempty"` // Data type that is comprehended by DT Type string `json:"type,omitempty"` // List of user values Value []string `json:"value,omitempty"` }
SingleCriteria condition object of SearchBuilderRequest
Ref: https://datatables.net/extensions/searchbuilder/examples/ Datatables search builder does not support GoLang backend, but here we're :) We're catching the JSON of SB from .getDetails() function and use it for our needs.
type StepchainRowDetailRequest ¶
type StepchainRowDetailRequest struct { Task string `json:"Task" validate:"required" binding:"required"` StepName string `json:"StepName"` // should not be required JobType string `json:"JobType"` // should not be required Site string `json:"Site"` // should not be required }
StepchainRowDetailRequest accepts Task name and returns this Task's details
type StepchainTask ¶
type StepchainTask struct { Links template.HTML `bson:"Links,omitempty"` // not belongs to actual data but required for carrying links to datatable response Task string `bson:"Task,omitempty" validate:"required"` CpuEfficiency float64 `bson:"CpuEfficiency,omitempty" validate:"required"` NumberOfStep float64 `bson:"NumberOfStep,omitempty" validate:"required"` MeanThread float64 `bson:"MeanThread" validate:"required"` MeanStream float64 `bson:"MeanStream,omitempty" validate:"required"` MeanCpuTimeHr float64 `bson:"MeanCpuTimeHr,omitempty" validate:"required"` TotalCpuTimeHr float64 `bson:"TotalCpuTimeHr,omitempty" validate:"required"` MeanJobTimeHr float64 `bson:"MeanJobTimeHr,omitempty" validate:"required"` TotalJobTimeHr float64 `bson:"TotalJobTimeHr,omitempty" validate:"required"` TotalThreadJobTimeHr float64 `bson:"TotalThreadJobTimeHr,omitempty"` WriteTotalHr float64 `bson:"WriteTotalHr,omitempty"` ReadTotalHr float64 `bson:"ReadTotalHr,omitempty"` ReadTimePercentage float64 `bson:"ReadTimePercentage,omitempty"` WriteTotalMB float64 `bson:"WriteTotalMB,omitempty"` ReadTotalMB float64 `bson:"ReadTotalMB,omitempty"` MeanPeakRss float64 `bson:"MeanPeakRss,omitempty"` MeanPeakVSize float64 `bson:"MeanPeakVSize,omitempty"` EraCount float64 `bson:"EraCount,omitempty"` SiteCount float64 `bson:"SiteCount,omitempty"` AcquisitionEra StringArray `bson:"AcquisitionEra,omitempty"` }
StepchainTask Stepchain task level cpu efficiency entry
type StepchainTaskWithCmsrunJobtype ¶
type StepchainTaskWithCmsrunJobtype struct { Links template.HTML `bson:"Links,omitempty"` // not belongs to actual data but required for carrying links to datatable response Task string `bson:"Task,omitempty" validate:"required"` StepName string `bson:"StepName,omitempty" validate:"required"` JobType string `bson:"JobType,omitempty" validate:"required"` CpuEfficiency float64 `bson:"CpuEfficiency,omitempty" validate:"required"` NumberOfStep float64 `bson:"NumberOfStep,omitempty" validate:"required"` MeanThread float64 `bson:"MeanThread" validate:"required"` MeanStream float64 `bson:"MeanStream,omitempty" validate:"required"` MeanCpuTimeHr float64 `bson:"MeanCpuTimeHr,omitempty" validate:"required"` TotalCpuTimeHr float64 `bson:"TotalCpuTimeHr,omitempty" validate:"required"` MeanJobTimeHr float64 `bson:"MeanJobTimeHr,omitempty" validate:"required"` TotalJobTimeHr float64 `bson:"TotalJobTimeHr,omitempty" validate:"required"` TotalThreadJobTimeHr float64 `bson:"TotalThreadJobTimeHr,omitempty"` WriteTotalHr float64 `bson:"WriteTotalHr,omitempty"` ReadTotalHr float64 `bson:"ReadTotalHr,omitempty"` ReadTimePercentage float64 `bson:"ReadTimePercentage,omitempty"` WriteTotalMB float64 `bson:"WriteTotalMB,omitempty"` ReadTotalMB float64 `bson:"ReadTotalMB,omitempty"` MeanPeakRss float64 `bson:"MeanPeakRss,omitempty"` MeanPeakVSize float64 `bson:"MeanPeakVSize,omitempty"` EraCount float64 `bson:"EraCount,omitempty"` SiteCount float64 `bson:"SiteCount,omitempty"` AcquisitionEra StringArray `bson:"AcquisitionEra,omitempty"` Sites StringArray `bson:"Sites,omitempty"` }
StepchainTaskWithCmsrunJobtype Stepchain task, cmsrun, jobtype level cpu efficiency entry
type StepchainTaskWithCmsrunJobtypeSite ¶
type StepchainTaskWithCmsrunJobtypeSite struct { Links template.HTML `bson:"Links,omitempty"` // not belongs to actual data but required for carrying links to datatable response Task string `bson:"Task,omitempty" validate:"required"` StepName string `bson:"StepName,omitempty" validate:"required"` JobType string `bson:"JobType,omitempty" validate:"required"` Site string `bson:"Site,omitempty" validate:"required"` CpuEfficiency float64 `bson:"CpuEfficiency,omitempty" validate:"required"` NumberOfStep float64 `bson:"NumberOfStep,omitempty" validate:"required"` MeanThread float64 `bson:"MeanThread" validate:"required"` MeanStream float64 `bson:"MeanStream,omitempty" validate:"required"` MeanCpuTimeHr float64 `bson:"MeanCpuTimeHr,omitempty" validate:"required"` TotalCpuTimeHr float64 `bson:"TotalCpuTimeHr,omitempty" validate:"required"` MeanJobTimeHr float64 `bson:"MeanJobTimeHr,omitempty" validate:"required"` TotalJobTimeHr float64 `bson:"TotalJobTimeHr,omitempty" validate:"required"` TotalThreadJobTimeHr float64 `bson:"TotalThreadJobTimeHr,omitempty"` WriteTotalHr float64 `bson:"WriteTotalHr,omitempty"` ReadTotalHr float64 `bson:"ReadTotalHr,omitempty"` ReadTimePercentage float64 `bson:"ReadTimePercentage,omitempty"` WriteTotalMB float64 `bson:"WriteTotalMB,omitempty"` ReadTotalMB float64 `bson:"ReadTotalMB,omitempty"` MeanPeakRss float64 `bson:"MeanPeakRss,omitempty"` MeanPeakVSize float64 `bson:"MeanPeakVSize,omitempty"` EraCount float64 `bson:"EraCount,omitempty"` AcquisitionEra StringArray `bson:"AcquisitionEra,omitempty"` }
StepchainTaskWithCmsrunJobtypeSite Stepchain task, cmsrun, jobtype and step level cpu efficiency entry
type StringArray ¶
type StringArray []string
StringArray type used for converting array with comma separated
func (StringArray) MarshalJSON ¶
func (t StringArray) MarshalJSON() ([]byte, error)
MarshalJSON marshal integer unix time to date string in YYYY-MM-DD format