A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/timing_8cpp_source.html below:

NCBI C++ ToolKit: src/app/pubseq_gateway/server/timing.cpp Source File

47 static string kEnd

(

"End"

);

60  const string

& description,

71  size_t

last_bin_index = bin_count - 1;

74  for

(

size_t

k = 0; k < bin_count; ++k) {

77  if

(k >= last_bin_index)

93

lower_anomalies + upper_anomalies);

102  int

most_recent_time,

103  unsigned long

tick_span,

105  const string

& description)

const 110  int64_t

histogram_start_time = 0;

112  for

(

auto

& bin : bins) {

113  int64_t

histogram_cover = tick_span * bin.n_ticks;

114  int64_t

histogram_end_time = histogram_start_time + histogram_cover - 1;

116  if

(most_recent_time >= 0) {

118  if

(most_recent_time > histogram_end_time) {

120

histogram_start_time = histogram_end_time + 1;

125  if

(most_ancient_time >= 0) {

127  if

(most_ancient_time < histogram_start_time) {

129

histogram_start_time = histogram_end_time + 1;

141

histogram_start_time = histogram_end_time + 1;

149  int

most_recent_time,

150  unsigned long

tick_span,

152  const string

& description)

const 158  int64_t

histogram_start_time = 0;

159  int64_t

actual_recent_time = -1;

160  int64_t

actual_ancient_time = -1;

162  for

(

auto

& bin : bins) {

163  int64_t

histogram_cover = tick_span * bin.n_ticks;

164  int64_t

histogram_end_time = histogram_start_time + histogram_cover - 1;

166  if

(most_recent_time >= 0) {

168  if

(most_recent_time > histogram_end_time) {

170

histogram_start_time = histogram_end_time + 1;

175  if

(most_ancient_time >= 0) {

177  if

(most_ancient_time < histogram_start_time) {

179

histogram_start_time = histogram_end_time + 1;

188  if

(actual_recent_time == -1)

189

actual_recent_time = histogram_start_time;

190

actual_ancient_time = histogram_end_time;

192

histogram_start_time = histogram_end_time + 1;

196  if

(actual_recent_time == -1 && actual_ancient_time == -1) {

209 #define TIMING_CLASS_DEF(class_name) \ 210  class_name::class_name(unsigned long min_stat_value, \ 211  unsigned long max_stat_value, \ 212  unsigned long n_bins, \ 213  TOnePSGTiming::EScaleType stat_type, \ 214  bool & reset_to_default) \ 216  reset_to_default = false; \ 218  TOnePSGTiming model_histogram(min_stat_value, max_stat_value, \ 219  n_bins, stat_type); \ 220  m_PSGTiming.reset(new TPSGTiming(model_histogram)); \ 222  reset_to_default = true; \ 223  TOnePSGTiming model_histogram(kMinStatValue, \ 226  TOnePSGTiming::eLog2); \ 227  m_PSGTiming.reset(new TPSGTiming(model_histogram)); \ 254  size_t

max_blob_size,

255  unsigned long

min_stat_value,

256  unsigned long

max_stat_value,

257  unsigned long

n_bins,

259  bool

& reset_to_default) :

260

m_MinBlobSize(min_blob_size), m_MaxBlobSize(max_blob_size)

262

reset_to_default =

false

;

265  TOnePSGTiming

model_histogram(min_stat_value, max_stat_value,

269

reset_to_default =

true

;

283  int

most_recent_time,

284  unsigned long

tick_span,

286  const string

& description)

const 300  int

most_recent_time,

301  unsigned long

tick_span,

303  const string

& description)

const 318  unsigned long

max_stat_value,

319  unsigned long

n_bins,

320  const string

& stat_type,

321  unsigned long

small_blob_size,

322  const string

& only_for_processor,

323  size_t

log_timing_threshold,

325

m_OnlyForProcessor(only_for_processor),

326

m_LogTimingThresholdMks(log_timing_threshold * 1000),

327

m_ProcGroupToIndex(proc_group_to_index)

333  bool

reset_to_default =

false

;

334  for

(

size_t

index = 0; index <= 1; ++index) {

336

unique_ptr<CLmdbCacheTiming>(

338

n_bins, scale_type, reset_to_default)));

340

unique_ptr<CLmdbCacheTiming>(

342

n_bins, scale_type, reset_to_default)));

344

unique_ptr<CLmdbCacheTiming>(

346

n_bins, scale_type, reset_to_default)));

348

unique_ptr<CCassTiming>(

350

n_bins, scale_type, reset_to_default)));

352

unique_ptr<CCassTiming>(

354

n_bins, scale_type, reset_to_default)));

356

unique_ptr<CCassTiming>(

358

n_bins, scale_type, reset_to_default)));

360

unique_ptr<CMyNCBITiming>(

362

n_bins, scale_type, reset_to_default)));

365

unique_ptr<CLmdbResolutionTiming>(

367

n_bins, scale_type, reset_to_default)));

369

unique_ptr<CCassResolutionTiming>(

371

n_bins, scale_type, reset_to_default)));

374

unique_ptr<CSplitHistoryRetrieveTiming>(

376

n_bins, scale_type, reset_to_default)));

379

unique_ptr<CPublicCommentRetrieveTiming>(

381

n_bins, scale_type, reset_to_default)));

384

unique_ptr<CAccVerHistoryRetrieveTiming>(

386

n_bins, scale_type, reset_to_default)));

389

unique_ptr<CIPGResolveRetrieveTiming>(

391

n_bins, scale_type, reset_to_default)));

394

unique_ptr<CVDBOpenTiming>(

396

n_bins, scale_type, reset_to_default)));

399

unique_ptr<CSNPPTISLookupTiming>(

401

n_bins, scale_type, reset_to_default)));

404

unique_ptr<CWGSVDBLookupTiming>(

406

n_bins, scale_type, reset_to_default)));

412

n_bins, scale_type, reset_to_default));

416

n_bins, scale_type, reset_to_default));

420  for

(

size_t

index = 0; index < 5; ++index) {

422

unique_ptr<CResolutionTiming>(

424

n_bins, scale_type, reset_to_default)));

434

n_bins, scale_type, small_blob_size);

437  for

(

size_t

req_index = 0;

448

unique_ptr<CProcessorPerformanceTiming>(

450

n_bins, scale_type, reset_to_default)));

452

unique_ptr<CProcessorPerformanceTiming>(

454

n_bins, scale_type, reset_to_default)));

456

unique_ptr<CProcessorPerformanceTiming>(

458

n_bins, scale_type, reset_to_default)));

460

unique_ptr<CProcessorPerformanceTiming>(

462

n_bins, scale_type, reset_to_default)));

467  if

(reset_to_default)

468  PSG_ERROR

(

"Invalid statistics parameters detected. Default parameters " 473

{

"LookupLmdbSi2csiFound"

,

475  "si2csi LMDB cache found"

,

476  "The timing of si2csi LMDB cache lookup " 477  "when a record was found" 480

{

"LookupLmdbSi2csiNotFound"

,

482  "si2csi LMDB cache not found"

,

483  "The timing of si2csi LMDB cache lookup " 484  "when there was no record found" 487

{

"LookupLmdbBioseqInfoFound"

,

489  "bioseq info LMDB cache found"

,

490  "The timing of bioseq info LMDB cache lookup " 491  "when a record was found" 494

{

"LookupLmdbBioseqInfoNotFound"

,

496  "bioseq info LMDB cache not found"

,

497  "The timing of bioseq info LMDB cache lookup " 498  "when there was no record found" 501

{

"LookupLmdbBlobPropFound"

,

503  "blob properties LMDB cache found"

,

504  "The timing of blob properties LMDB cache lookup " 505  "when a record was found" 508

{

"LookupLmdbBlobPropNotFound"

,

510  "blob properties LMDB cache not found"

,

511  "The timing of blob properties LMDB cache lookup " 512  "when there was no record found" 515

{

"LookupCassSi2csiFound"

,

517  "si2csi Cassandra found"

,

518  "The timing of si2csi Cassandra lookup " 519  "when a record was found" 522

{

"LookupCassSi2csiNotFound"

,

524  "si2csi Cassandra not found"

,

525  "The timing of si2csi Cassandra lookup " 526  "when there was no record found" 529

{

"LookupCassBioseqInfoFound"

,

531  "bioseq info Cassandra found"

,

532  "The timing of bioseq info Cassandra lookup " 533  "when a record was found" 536

{

"LookupCassBioseqInfoNotFound"

,

538  "bioseq info Cassandra not found"

,

539  "The timing of bioseq info Cassandra lookup " 540  "when there was no record found" 543

{

"LookupCassBlobPropFound"

,

545  "blob properties Cassandra found"

,

546  "The timing of blob properties Cassandra lookup " 547  "when a record was found" 550

{

"LookupCassBlobPropNotFound"

,

552  "blob properties Cassandra not found"

,

553  "The timing of blob properties Cassandra lookup " 554  "when there was no record found" 557

{

"RetrieveMyNCBIFound"

,

559  "retrieve MyNCBI found"

,

560  "The timing of the retrieve data from MyNCBI when a record " 564

{

"RetrieveMyNCBIError"

,

566  "MyNCBI retrieve timing in case of errors"

,

567  "The time MyNCBI replied within when there was an error" 570

{

"RetrieveMyNCBINotFound"

,

572  "retrieve MyNCBI not found"

,

573  "The timing of the retrieve data from MyNCBI when there was no " 577

{

"ResolutionLmdbFound"

,

579  "LMDB resolution succeeded"

,

580  "The timing of a seq id successful resolution " 581  "in LMDB cache (start: request is received)" 584

{

"ResolutionLmdbNotFound"

,

586  "LMDB resolution not found"

,

587  "The timing of a seq id unsuccessful resolution " 588  "when all the tries in LMDB cache led to nothing " 589  "(start: request is received)" 592

{

"ResolutionCassFound"

,

594  "CassandraDB resolution succeeded"

,

595  "The timing of a seq id successful resolution " 596  "in Cassandra regardless how many queries were " 597  "made to Cassandra (start: first Cassandra query)" 600

{

"ResolutionCassNotFound"

,

602  "CassandraDB resolution not found"

,

603  "The timing of a seq id unsuccessful resolution " 604  "when all the tries in Cassandra led to nothing " 605  "start: first Cassandra query)" 608

{

"SplitHistoryRetrieveFound"

,

610  "Split history found"

,

611  "The timing of split history successful retrieval" 614

{

"SplitHistoryRetrieveNotFound"

,

616  "Split history not found"

,

617  "The timing of split history retrieval " 618  "when nothing was found" 621

{

"PublicCommentRetrieveFound"

,

623  "Public comment found"

,

624  "The timing of a public comment successful retrieval" 627

{

"PublicCommentRetrieveNotFound"

,

629  "Public comment not found"

,

630  "The timing of a public comment retrieval " 631  "when nothing was found" 634

{

"AccessionVersionHistoryRetrieveFound"

,

636  "Accession version history found"

,

637  "The timing of an accession version history successful retrieval" 640

{

"AccessionVersionHistoryRetrieveNotFound"

,

642  "Accession version history not found"

,

643  "The timing of an accession version history retrieval " 644  "when nothing was found" 647

{

"IPGResolveRetrieveFound"

,

649  "IPG resolve found"

,

650  "The timing of an ipg successful retrieval" 653

{

"IPGResolveRetrieveNotFound"

,

655  "IPG resolve not found"

,

656  "The timing of an ipg resolve retrieval " 657  "when nothing was found" 662  "VDB opening success"

,

663  "The timing of the successful VDB opening" 668  "VDB opening failure"

,

669  "The timing of the failed VDB opening" 672

{

"SNPPTISLookupFound"

,

674  "SNP PTIS lookup found"

,

675  "The timing of the SNP PTIS lookup success" 678

{

"SNPPTISLookupNotFound"

,

680  "SNP PTIS lookup not found"

,

681  "The timing of the SNP PTIS lookup when nothing was found" 684

{

"WGSVDBLookupFound"

,

686  "WGS VDB lookup found"

,

687  "The timing of the WGS VDB lookup success" 690

{

"WGSVDBLookupNotFound"

,

692  "WGS VDB lookup not found"

,

693  "The timing of the WGS VDB lookup when nothing was found" 699  "The time a request spent in a backlog before processing" 702

{

"ResolutionFoundCassandraIn1Try"

,

704  "Resolution succeeded via Cassandra (1 try)"

,

705  "The timing of a seq id resolution in Cassandra when " 706  "1 try was required (start: first Cassandra query)" 709

{

"ResolutionFoundCassandraIn2Tries"

,

711  "Resolution succeeded via Cassandra (2 tries)"

,

712  "The timing of a seq id resolution in Cassandra when " 713  "2 tries were required (start: first Cassandra query)" 716

{

"ResolutionFoundCassandraIn3Tries"

,

718  "Resolution succeeded via Cassandra (3 tries)"

,

719  "The timing of a seq id resolution in Cassandra when " 720  "3 tries were required (start: first Cassandra query)" 723

{

"ResolutionFoundCassandraIn4Tries"

,

725  "Resolution succeeded via Cassandra (4 tries)"

,

726  "The timing of a seq id resolution in Cassandra when " 727  "4 tries were required (start: first Cassandra query)" 730

{

"ResolutionFoundCassandraIn5OrMoreTries"

,

732  "Resolution succeeded via Cassandra (5 tries or more)"

,

733  "The timing of a seq id resolution in Cassandra when " 734  "5 or more tries were required (start: first Cassandra query)" 742

proc_group_names[item.second] = item.first;

745  for

(

size_t

req_index = 0;

750  size_t

proc_index = item.second;

753  string

prefix = item.first +

"_"

+

755  string

suffix =

"_ProcessorPerformance"

;

759

item.first +

" Done performance for "

+ req_name,

760  "The timing of the "

+ item.first +

761  " processor when it finished with status Done for "

+ req_name);

765

item.first +

" NotFound performance for "

+ req_name,

766  "The timing of the "

+ item.first +

767  " processor when it finished with status NotFound for "

+ req_name);

771

item.first +

" Timeout performance for "

+ req_name,

772  "The timing of the "

+ item.first +

773  " processor when it finished with status Timeout for "

+ req_name);

777

item.first +

" Error performance for "

+ req_name,

778  "The timing of the "

+ item.first +

779  " processor when it finished with status Error for "

+ req_name);

783  for

(

const auto

& proc_group : proc_group_names) {

784  string id

= proc_group +

"ResolutionError"

;

786

unique_ptr<CResolutionTiming>(

788

n_bins, scale_type, reset_to_default)));

791

proc_group +

" resolution error"

,

792  "The timing of a case when an error was detected while " 793  "resolving seq id (by "

+ proc_group +

794  ") regardless of the resolution path " 795  "(start: request is received)"

);

797  id

= proc_group +

"ResolutionNotFound"

;

799

unique_ptr<CResolutionTiming>(

801

n_bins, scale_type, reset_to_default)));

803

proc_group +

" resolution not found"

,

804  "The timing of a case when resolution of a seq id did not succeed " 805  "(by "

+ proc_group +

") regardless of the resolution path " 806  "(start: request is received)"

);

808  id

= proc_group +

"ResolutionFound"

;

810

unique_ptr<CResolutionTiming>(

812

n_bins, scale_type, reset_to_default)));

814

proc_group +

" resolution succeeded"

,

815  "The timing of a seq id successful resolution (by "

+

816

proc_group +

") regardless of the resolution path " 817  "(start: request is received)"

);

821

unique_ptr<CNARetrieveTiming>(

823

n_bins, scale_type, reset_to_default)));

824  id

= proc_group +

"NARetrieveFound"

;

826

proc_group +

" named annotations found"

,

827  "The timing of named annotations successful retrieval (by "

+

830  id

= proc_group +

"NARetrieveNotFound"

;

832

unique_ptr<CNARetrieveTiming>(

834

n_bins, scale_type, reset_to_default)));

836

proc_group +

" named annotations not found"

,

837  "The timing of named annotations retrieval " 838  "when nothing was found (by "

+ proc_group +

")"

);

842

unique_ptr<CTSEChunkRetrieveTiming>(

844

n_bins, scale_type, reset_to_default)));

845  id

= proc_group +

"TSEChunkRetrieveFound"

;

847

proc_group +

" TSE chunk found"

,

848  "The timing of a TSE chunk retrieval (by "

+ proc_group +

")"

);

851

unique_ptr<CTSEChunkRetrieveTiming>(

853

n_bins, scale_type, reset_to_default)));

854  id

= proc_group +

"TSEChunkRetrieveNotFound"

;

856

proc_group +

" TSE chunk not found"

,

857  "The timing of a TSE chunk retrieval " 858  "when nothing was found (by "

+ proc_group +

")"

);

862

unique_ptr<CNAResolveTiming>(

864

n_bins, scale_type, reset_to_default)));

865  id

= proc_group +

"NAResolveFound"

;

868  if

(proc_group ==

"CDD"

|| proc_group ==

"SNP"

) {

870

proc_group +

" NA resolution found"

,

871  "The timing of the NA resolution (by "

+ proc_group +

")"

);

873  m_NamesMap

[id] =

SInfo

(

nullptr

,

"uninitialized"

,

"uninitialized"

);

877

unique_ptr<CNAResolveTiming>(

879

n_bins, scale_type, reset_to_default)));

880  id

= proc_group +

"NAResolveNotFound"

;

883  if

(proc_group ==

"CDD"

|| proc_group ==

"SNP"

) {

885

proc_group +

" NA resolution not found"

,

886  "The timing of the NA resolution " 887  "when nothing was found (by "

+ proc_group +

")"

);

889  m_NamesMap

[id] =

SInfo

(

nullptr

,

"uninitialized"

,

"uninitialized"

);

893

unique_ptr<CHugeBlobRetrieveTiming>(

895

n_bins, scale_type, reset_to_default)));

896  id

= proc_group +

"HugeBlobRetrieval"

;

898

proc_group +

" huge blob retrieval"

,

899  "The timing of the very large blob retrieval"

,

901

proc_group +

"HugeBlobByteCounter"

,

902

proc_group +

" huge blob bytes counter"

,

903  "The number of bytes transferred to the user as very large blobs by "

+ proc_group

907

unique_ptr<CNotFoundBlobRetrieveTiming>(

909

n_bins, scale_type, reset_to_default)));

910  id

= proc_group +

"BlobRetrievalNotFound"

;

912

proc_group +

" blob retrieval not found"

,

913  "The timing of blob retrieval when a blob was not found by "

+ proc_group);

917  string

min_size_str = to_string(retieve_timing->GetMinBlobSize());

918  string

max_size_str = to_string(retieve_timing->GetMaxBlobSize());

919  string id

= proc_group +

"BlobRetrievalFrom"

+ min_size_str +

"To"

+ max_size_str;

920  string

name = proc_group +

" Blob retrieval (size: "

+

921

min_size_str +

" to "

+ max_size_str +

")"

;

922  string

description =

"The timing of a blob retrieval when " 923  "the blob size is between "

+ min_size_str +

924  " and "

+ max_size_str +

" bytes"

;

926  string

counter_id = proc_group +

"BlobByteCounterFrom"

+ min_size_str +

928  string

counter_name =

"Blob byte counter (blob size: "

+

929

min_size_str +

" to "

+ max_size_str +

") by "

+ proc_group;

930  string

counter_description =

"The number of bytes transferred to " 931  "the user as blobs size between "

+

932

min_size_str +

" and "

+

933

max_size_str +

" by "

+ proc_group;

936

counter_id, counter_name, counter_description);

952  auto

id_to_name_and_desc = app->Settings().m_IdToNameAndDescription;

954  for

(

const auto

& item : id_to_name_and_desc) {

956  m_NamesMap

[item.first].m_Name = get<0>(item.second);

957  m_NamesMap

[item.first].m_Description = get<1>(item.second);

962  if

(

info

.second.m_CounterId == item.first) {

963  info

.second.m_CounterName = get<0>(item.second);

964  info

.second.m_CounterDescription = get<1>(item.second);

1003  unsigned long

max_stat_value,

1004  unsigned long

n_bins,

1006  unsigned long

small_blob_size)

1008  bool

reset_to_default =

false

;

1012

unique_ptr<CBlobRetrieveTiming>(

1014

min_stat_value, max_stat_value,

1016

reset_to_default)));

1020  m_Ends

.push_back(small_blob_size);

1022  unsigned long

range_end = small_blob_size;

1023  unsigned long

range_start = range_end + 1;

1027

range_end = (size_t(1) << k) - 1;

1028  if

(range_end <= small_blob_size) {

1034

unique_ptr<CBlobRetrieveTiming>(

1036

min_stat_value, max_stat_value,

1038

reset_to_default)));

1042  m_Ends

.push_back(range_end);

1044

range_start = range_end + 1;

1051  return

reset_to_default;

1060  for

(

size_t

index = 0; ; ++index) {

1061  if

(

m_Ends

[index] >= blob_size)

1072  unsigned long

blob_size)

1076  if

(processor !=

nullptr

) {

1085  auto

now = psg_clock_t::now();

1086  uint64_t

mks = chrono::duration_cast<chrono::microseconds>(now - op_begin_ts).count();

1130  if

(bin_index < 0) {

1139  PSG_ERROR

(

"No processor for per processor timing ("

+

1147  PSG_ERROR

(

"No processor for per processor timing ("

+

1148

to_string(

eNARetrieve

) +

"). Ignore and continue."

);

1166  PSG_ERROR

(

"No processor for per processor timing ("

+

1173  PSG_ERROR

(

"No processor for per processor timing ("

+

1180  PSG_ERROR

(

"No processor for per processor timing ("

+

1188

index = blob_size - 1;

1197  PSG_ERROR

(

"No processor for per processor timing ("

+

1203  if

(group_name ==

"CDD"

|| group_name ==

"SNP"

) {

1206  PSG_ERROR

(

"NA resolve timing is supported for " 1207  "CDD and SNP only. Received from: "

+ group_name);

1210  PSG_ERROR

(

"No processor for per processor timing ("

+

1211

to_string(

eNAResolve

) +

"). Ignore and continue."

);

1234  if

(processor !=

nullptr

) {

1236

app->GetCounters().Increment(processor,

1242

request->SetRequestContext();

1274  switch

(request_type) {

1305  switch

(request_type) {

1342  size_t

request_index =

static_cast<size_t>

(processor->

GetRequest

()->GetRequestType());

1346  auto

now = psg_clock_t::now();

1347  uint64_t

mks = chrono::duration_cast<chrono::microseconds>(now - start_timestamp).count();

1349  switch

(proc_finish_status) {

1380

lock_guard<mutex> guard(

m_Lock

);

1382  for

(

size_t

k = 0; k <= 1; ++k) {

1446  for

(

size_t

req_index = 0;

1490

lock_guard<mutex> guard(

m_Lock

);

1492  for

(

size_t

k = 0; k <= 1; ++k) {

1530

item->RotateAvgTimeSeries();

1533

item->RotateAvgTimeSeries();

1536

item->RotateAvgTimeSeries();

1539

item->RotateAvgTimeSeries();

1542

item->RotateAvgTimeSeries();

1548

item->RotateAvgTimeSeries();

1552

item->RotateAvgTimeSeries();

1556  for

(

size_t

req_index = 0;

1570  size_t

active_request_count,

1571  size_t

backlog_count)

1584

lock_guard<mutex> guard(

m_Lock

);

1586  for

(

size_t

k = 0; k <= 1; ++k) {

1684  for

(

size_t

req_index = 0;

1701  int

most_recent_time,

1702  const

vector<CTempString> & histogram_names,

1703  const

vector<pair<int, int>> & time_series,

1704  unsigned long

tick_span)

const 1712  size_t

current_index;

1719  if

(histogram_names.empty()) {

1722

lock_guard<mutex> guard(

m_Lock

);

1724  for

(

const auto

& name_to_histogram :

m_NamesMap

) {

1725  if

(name_to_histogram.second.m_Timing ==

nullptr

) {

1730

ret.

SetByKey

(name_to_histogram.first,

1731

name_to_histogram.second.m_Timing->SerializeCombined(

1735

name_to_histogram.second.m_Name,

1736

name_to_histogram.second.m_Description));

1737  if

(name_to_histogram.second.m_Counter !=

nullptr

) {

1740

name_to_histogram.second.m_CounterName);

1741

bytes_counter.

SetString

(

"description"

,

1742

name_to_histogram.second.m_CounterDescription);

1744

*name_to_histogram.second.m_Counter);

1745

ret.

SetByKey

(name_to_histogram.second.m_CounterId,

1749  if

(!time_series.empty()) {

1751

name_to_histogram.first +

"_AvgTimeSeries"

,

1752

name_to_histogram.second.m_Timing->SerializeAvgPerfSeries(

1756

loop, current_index));

1763  if

(!time_series.empty()) {

1764

ret.

SetByKey

(

"ID_get_time_series"

,

1768

loop, current_index));

1769

ret.

SetByKey

(

"ID_getblob_time_series"

,

1773

loop, current_index));

1774

ret.

SetByKey

(

"ID_resolve_time_series"

,

1778

loop, current_index));

1779

ret.

SetByKey

(

"ID_acc_ver_hist_time_series"

,

1783

loop, current_index));

1784

ret.

SetByKey

(

"ID_get_tse_chunk_time_series"

,

1788

loop, current_index));

1789

ret.

SetByKey

(

"ID_get_na_time_series"

,

1793

loop, current_index));

1794

ret.

SetByKey

(

"IPG_resolve_time_series"

,

1798

loop, current_index));

1800  bool

momentous_cnt_loop;

1801  size_t

momentous_cnt_current_index;

1803

ret.

SetByKey

(

"TCP_connections_time_series"

,

1808

momentous_cnt_current_index));

1809

ret.

SetByKey

(

"active_requests_time_series"

,

1814

momentous_cnt_current_index));

1815

ret.

SetByKey

(

"backlog_time_series"

,

1820

momentous_cnt_current_index));

1827  if

(current_index == 0) {

1831

raw_index = current_index - 1;

1840

max_warnings, max_not_found);

1848  while

(raw_index > current_index + 1) {

1850

max_warnings, max_not_found);

1857

ret.

SetDouble

(

"MaxPerSec_Requests"

, max_requests / 60.0);

1858

ret.

SetDouble

(

"MaxPerSec_Errors"

, max_errors / 60.0);

1859

ret.

SetDouble

(

"MaxPerSec_Warnings"

, max_warnings / 60.0);

1860

ret.

SetDouble

(

"MaxPerSec_NotFound"

, max_not_found / 60.0);

1865

ret.

SetByKey

(item.first +

"_ID_get_time_series"

,

1869

loop, current_index));

1870

ret.

SetByKey

(item.first +

"_ID_getblob_time_series"

,

1874

loop, current_index));

1875

ret.

SetByKey

(item.first +

"_ID_resolve_time_series"

,

1879

loop, current_index));

1880

ret.

SetByKey

(item.first +

"_ID_get_tse_chunk_time_series"

,

1884

loop, current_index));

1885

ret.

SetByKey

(item.first +

"_ID_get_na_time_series"

,

1889

loop, current_index));

1891

ret.

SetByKey

(

"error_time_series"

,

1895

loop, current_index));

1898

lock_guard<mutex> guard(

m_Lock

);

1900  for

(

const auto

& name : histogram_names) {

1901  string

histogram_name(name.data(), name.size());

1902  const auto

iter =

m_NamesMap

.find(histogram_name);

1904  if

(iter->second.m_Timing ==

nullptr

) {

1911

iter->second.m_Timing->SerializeSeries(most_ancient_time,

1914

iter->second.m_Name,

1915

iter->second.m_Description));

1916  if

(iter->second.m_Counter !=

nullptr

) {

1919

iter->second.m_CounterName);

1920

bytes_counter.

SetString

(

"description"

,

1921

iter->second.m_CounterDescription);

1923

*(iter->second.m_Counter));

1924

ret.

SetByKey

(iter->second.m_CounterId,

1955

max_requests =

max

(max_requests, requests);

1956

max_errors =

max

(max_errors, errors);

1957

max_warnings =

max

(max_warnings, warnings);

unsigned long m_MinBlobSize

CBlobRetrieveTiming(unsigned long min_blob_size, unsigned long max_blob_size, unsigned long min_stat_value, unsigned long max_stat_value, unsigned long n_bins, TOnePSGTiming::EScaleType stat_type, bool &reset_to_default)

unsigned long m_MaxBlobSize

virtual CJsonNode SerializeCombined(int most_ancient_time, int most_recent_time, unsigned long tick_span, const string &name, const string &description) const

virtual CJsonNode SerializeSeries(int most_ancient_time, int most_recent_time, unsigned long tick_span, const string &name, const string &description) const

CHistogram – collect the distribution of the numerical data samples.

static CJsonNode NewArrayNode()

Create a new JSON array node.

void SetDouble(const string &key, double value)

Set a JSON object element to the specified floating point value.

void SetString(const string &key, const string &value)

Set a JSON object element to the specified string value.

void SetInteger(const string &key, Int8 value)

Set a JSON object element to the specified integer value.

void SetByKey(const string &key, CJsonNode::TInstance value)

For a JSON object node, insert a new element or update an existing element.

static CJsonNode NewObjectNode()

Create a new JSON object node.

void Append(CJsonNode::TInstance value)

For an array node, add a new element at the end of the array.

CJsonNode Serialize(const vector< pair< int, int >> &time_series, int most_ancient_time, int most_recent_time, bool loop, size_t current_index) const

CJsonNode Serialize(const vector< pair< int, int >> &time_series, int most_ancient_time, int most_recent_time, bool loop, size_t current_index) const

void RotateAvgPerfTimeSeries(void)

CMomentousCounterSeries m_BacklogStat

CMomentousCounterSeries m_TCPConnectionsStat

unique_ptr< CMyNCBITiming > m_RetrieveMyNCBIErrorTiming

string m_TooLongIDs[eOperationLast]

vector< unique_ptr< CResolutionTiming > > m_ResolutionFoundTiming

vector< vector< unique_ptr< CBlobRetrieveTiming > > > m_BlobRetrieveTiming

vector< vector< unique_ptr< CProcessorPerformanceTiming > > > m_NotFoundProcPerformance

vector< vector< uint64_t > > m_BlobByteCounters

CRequestTimeSeries m_IdGetblobStat

vector< unique_ptr< CWGSVDBLookupTiming > > m_WGSVDBLookupTiming

vector< unique_ptr< CAccVerHistoryRetrieveTiming > > m_AccVerHistoryRetrieveTiming

uint64_t Register(IPSGS_Processor *processor, EPSGOperation operation, EPSGOperationStatus status, const psg_time_point_t &op_begin_ts, size_t blob_size=0)

void RotateRequestStat(void)

vector< unique_ptr< CProcessorRequestTimeSeries > > m_IdGetDoneByProc

vector< vector< unique_ptr< CNAResolveTiming > > > m_NAResolveTiming

CRequestTimeSeries m_IpgResolveStat

vector< unique_ptr< CResolutionTiming > > m_ResolutionNotFoundTiming

vector< unique_ptr< CCassTiming > > m_LookupCassBioseqInfoTiming

vector< unique_ptr< CResolutionTiming > > m_ResolutionErrorTiming

void RegisterProcessorPerformance(IPSGS_Processor *processor, IPSGS_Processor::EPSGS_Status proc_finish_status)

CMonotonicCounterSeries m_ErrorTimeSeries

bool x_SetupBlobSizeBins(unsigned long min_stat_value, unsigned long max_stat_value, unsigned long n_bins, TOnePSGTiming::EScaleType stat_type, unsigned long small_blob_size)

vector< unique_ptr< CMyNCBITiming > > m_RetrieveMyNCBITiming

CRequestTimeSeries m_IdGetTSEChunkStat

void RegisterProcessorDone(CPSGS_Request::EPSGS_Type request_type, IPSGS_Processor *processor)

size_t m_LogTimingThresholdMks

unique_ptr< CBacklogTiming > m_BacklogTiming

COperationTiming(unsigned long min_stat_value, unsigned long max_stat_value, unsigned long n_bins, const string &stat_type, unsigned long small_blob_size, const string &only_for_processor, size_t log_timing_threshold, const map< string, size_t > &proc_group_to_index)

vector< unique_ptr< CLmdbCacheTiming > > m_LookupLmdbBioseqInfoTiming

vector< unique_ptr< CResolutionTiming > > m_ResolutionFoundCassandraTiming

CRequestTimeSeries m_IdGetNAStat

CJsonNode Serialize(int most_ancient_time, int most_recent_time, const vector< CTempString > &histogram_names, const vector< pair< int, int >> &time_series, unsigned long tick_span) const

vector< unique_ptr< CSNPPTISLookupTiming > > m_SNPPTISLookupTiming

vector< unique_ptr< CVDBOpenTiming > > m_VDBOpenTiming

map< string, SInfo > m_NamesMap

vector< unique_ptr< CHugeBlobRetrieveTiming > > m_HugeBlobRetrievalTiming

vector< unique_ptr< CSplitHistoryRetrieveTiming > > m_SplitHistoryRetrieveTiming

vector< unique_ptr< CNotFoundBlobRetrieveTiming > > m_NotFoundBlobRetrievalTiming

vector< vector< unique_ptr< CNARetrieveTiming > > > m_NARetrieveTiming

vector< unique_ptr< CLmdbCacheTiming > > m_LookupLmdbSi2csiTiming

vector< unique_ptr< CProcessorRequestTimeSeries > > m_IdGetNADoneByProc

vector< unique_ptr< CPublicCommentRetrieveTiming > > m_PublicCommentRetrieveTiming

void RegisterForTimeSeries(CPSGS_Request::EPSGS_Type request_type, CRequestStatus::ECode status)

vector< unique_ptr< CCassResolutionTiming > > m_ResolutionCassTiming

CRequestTimeSeries m_IdAccVerHistStat

CRequestTimeSeries m_IdResolveStat

map< string, size_t > m_ProcGroupToIndex

vector< vector< unique_ptr< CTSEChunkRetrieveTiming > > > m_TSEChunkRetrieveTiming

void x_UpdateMaxReqsStat(size_t index, uint64_t &max_requests, uint64_t &max_errors, uint64_t &max_warnings, uint64_t &max_not_found) const

vector< unsigned long > m_Ends

void CollectMomentousStat(size_t tcp_conn_count, size_t active_request_count, size_t backlog_count)

vector< unique_ptr< CLmdbResolutionTiming > > m_ResolutionLmdbTiming

vector< unique_ptr< CProcessorRequestTimeSeries > > m_IdGetTSEChunkDoneByProc

string m_OnlyForProcessor

vector< unique_ptr< CIPGResolveRetrieveTiming > > m_IPGResolveRetrieveTiming

vector< unique_ptr< CCassTiming > > m_LookupCassBlobPropTiming

vector< unique_ptr< CCassTiming > > m_LookupCassSi2csiTiming

vector< unique_ptr< CLmdbCacheTiming > > m_LookupLmdbBlobPropTiming

vector< vector< unique_ptr< CProcessorPerformanceTiming > > > m_ErrorProcPerformance

vector< unique_ptr< CProcessorRequestTimeSeries > > m_IdGetblobDoneByProc

vector< vector< unique_ptr< CProcessorPerformanceTiming > > > m_DoneProcPerformance

CMomentousCounterSeries m_ActiveRequestsStat

vector< unique_ptr< CProcessorRequestTimeSeries > > m_IdResolveDoneByProc

CRequestTimeSeries m_IdGetStat

vector< vector< unique_ptr< CProcessorPerformanceTiming > > > m_TimeoutProcPerformance

vector< uint64_t > m_HugeBlobByteCounter

ssize_t x_GetBlobRetrievalBinIndex(unsigned long blob_size)

static string TypeToString(EPSGS_Type req_type)

@ ePSGS_AnnotationRequest

@ ePSGS_BlobBySatSatKeyRequest

@ ePSGS_IPGResolveRequest

@ ePSGS_AccessionVersionHistoryRequest

@ ePSGS_BlobBySeqIdRequest

unique_ptr< TPSGTiming > m_PSGTiming

virtual CJsonNode SerializeCombined(int most_ancient_time, int most_recent_time, unsigned long tick_span, const string &name, const string &description) const

uint64_t GetMaxValue(void) const

virtual CJsonNode SerializeSeries(int most_ancient_time, int most_recent_time, unsigned long tick_span, const string &name, const string &description) const

static CPubseqGatewayApp * GetInstance(void)

void AppendData(size_t index, uint64_t &requests, uint64_t &errors, uint64_t &warnings, uint64_t &not_found) const

CJsonNode Serialize(const vector< pair< int, int >> &time_series, int most_ancient_time, int most_recent_time, bool loop, size_t current_index) const

static EPSGSCounter RequestStatusToCounter(CRequestStatus::ECode status)

void Add(EPSGSCounter counter)

void GetLoopAndIndex(bool &loop, size_t &current_index) const

Interface class (and self-factory) for request processor objects that can retrieve data from a given ...

psg_time_point_t GetProcessInvokeTimestamp(bool &is_valid) const

Provides the timestamp of when the Process() method was called.

shared_ptr< CPSGS_Request > GetRequest(void) const

Provides the user request.

virtual string GetGroupName(void) const =0

Tells the processor group name.

EPSGS_Status

The GetStatus() method returns a processor current status.

Include a standard set of the NCBI C++ Toolkit most basic headers.

CDiagContext_Extra & Print(const string &name, const string &value)

The method does not print the argument, but adds it to the string.

CDiagContext & GetDiagContext(void)

Get diag context instance.

CDiagContext_Extra Extra(void) const

Create a temporary CDiagContext_Extra object.

@ e503_ServiceUnavailable

@ e505_HTTPVerNotSupported

@ e500_InternalServerError

unsigned GetNumberOfBins() const

Return the number ot bins on the combined scale.

CHistogram Clone(EClone how=eCloneAll) const

Clone histogram structure.

list< STimeBin > TTimeBins

Type of the series of histograms.

TSum GetSum(void) const

Return the sum of all added values.

size_t GetLowerAnomalyCount() const

Get number of hits whose values were less than GetMin().

void AddCountersFrom(const CHistogram &other)

Add counters from 'other' histogram to this histogram, 'other' doesn't changes.

const TScale * GetBinStartsPtr() const

Get starting positions for bins on the combined scale (not MT safe).

TValue GetMax() const

Get the upper bound of the combined scale.

const TCounter * GetBinCountersPtr() const

Get counters for the combined scale's bins (not MT safe).

TCounter GetCount() const

Get total number of hits whose value fell between GetMin() and GetMax().

size_t GetUpperAnomalyCount() const

Get number of hits whose values were greater than GetMax().

@ eLog2

Binary logarithmic scale with a base 2.

@ eLinear

Arithmetic or linear scale.

@ eCloneStructureOnly

Clone structure only (the counters will be zeroed)

static int CompareNocase(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)

Case-insensitive compare of a substring with another string.

static string & Replace(const string &src, const string &search, const string &replace, string &dst, SIZE_TYPE start_pos=0, SIZE_TYPE max_replace=0, SIZE_TYPE *num_replace=0)

Replace occurrences of a substring within a string.

operation

Bit operations.

#define PSG_ERROR(message)

psg_clock_t::time_point psg_time_point_t

static constexpr size_t kSeriesIntervals

static string kCount("Count")

static string kValueSum("ValueSum")

static string kBins("Bins")

#define TIMING_CLASS_DEF(class_name)

static string kMaxValue("MaxValue")

static string kName("name")

static string kUpperAnomaly("UpperAnomaly")

static string kTotalCount("TotalCount")

static string kStartBlobSize("MinBlobSize")

static string kTimeRangeEnd("TimeRangeEnd")

static string kSecondsCovered("SecondsCovered")

CJsonNode SerializeHistogram(const TOnePSGTiming &histogram, const string &name, const string &description, uint64_t max_value)

static string kStart("Start")

static string kEnd("End")

const unsigned long kMaxBlobSize

static string kEndBlobSize("MaxBlobSize")

static string kLowerAnomaly("LowerAnomaly")

static string kDescription("description")

static string kTimeRangeStart("TimeRangeStart")

const unsigned long kNStatBins

const unsigned long kMinStatValue

@ eResolutionFoundInCassandra

const unsigned long kMaxStatValue

CHistogramTimeSeries< uint64_t, uint64_t, uint64_t > TPSGTiming


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4