Example #1
0
unsigned long long PerformanceTiming::connectEnd() const
{
    DocumentLoader* loader = documentLoader();
    if (!loader)
        return connectStart();

    const ResourceLoadTiming& timing = loader->response().resourceLoadTiming();
    
    // connectEnd will be -1 when a network request is not made.
    // Rather than exposing a special value that indicates no new connection, we "backfill" with connectStart.
    if (timing.connectEnd < 0)
        return connectStart();

    return resourceLoadTimeRelativeToAbsolute(timing.connectEnd);
}
Example #2
0
ScriptValue PerformanceTiming::toJSONForBinding(
    ScriptState* scriptState) const {
  V8ObjectBuilder result(scriptState);
  result.addNumber("navigationStart", navigationStart());
  result.addNumber("unloadEventStart", unloadEventStart());
  result.addNumber("unloadEventEnd", unloadEventEnd());
  result.addNumber("redirectStart", redirectStart());
  result.addNumber("redirectEnd", redirectEnd());
  result.addNumber("fetchStart", fetchStart());
  result.addNumber("domainLookupStart", domainLookupStart());
  result.addNumber("domainLookupEnd", domainLookupEnd());
  result.addNumber("connectStart", connectStart());
  result.addNumber("connectEnd", connectEnd());
  result.addNumber("secureConnectionStart", secureConnectionStart());
  result.addNumber("requestStart", requestStart());
  result.addNumber("responseStart", responseStart());
  result.addNumber("responseEnd", responseEnd());
  result.addNumber("domLoading", domLoading());
  result.addNumber("domInteractive", domInteractive());
  result.addNumber("domContentLoadedEventStart", domContentLoadedEventStart());
  result.addNumber("domContentLoadedEventEnd", domContentLoadedEventEnd());
  result.addNumber("domComplete", domComplete());
  result.addNumber("loadEventStart", loadEventStart());
  result.addNumber("loadEventEnd", loadEventEnd());
  return result.scriptValue();
}
Example #3
0
unsigned long long PerformanceTiming::connectEnd() const {
  DocumentLoader* loader = documentLoader();
  if (!loader)
    return connectStart();

  ResourceLoadTiming* timing = loader->response().resourceLoadTiming();
  if (!timing)
    return connectStart();

  // connectEnd will be zero when a network request is not made.  Rather than
  // exposing a special value that indicates no new connection, we "backfill"
  // with connectStart.
  double connectEnd = timing->connectEnd();
  if (connectEnd == 0.0 || loader->response().connectionReused())
    return connectStart();

  return monotonicTimeToIntegerMilliseconds(connectEnd);
}
double PerformanceResourceTiming::connectEnd() const
{
    if (!m_allowTimingDetails)
        return 0.0;

    // connectStart will be zero when a network request is not made.
    if (!m_timing || m_timing->connectEnd() == 0.0 || m_didReuseConnection)
        return connectStart();

    return monotonicTimeToDOMHighResTimeStamp(m_timeOrigin, m_timing->connectEnd());
}
double PerformanceResourceTiming::connectEnd() const
{
    if (!m_shouldReportDetails)
        return 0.0;

    // connectStart will be -1 when a network request is not made.
    if (m_timing.connectEnd < 0)
        return connectStart();

    return resourceTimeToDocumentMilliseconds(m_timing.connectEnd);
}
double PerformanceResourceTiming::connectEnd() const
{
    if (!m_allowTimingDetails)
        return 0.0;

    // connectStart will be zero when a network request is not made.
    if (!m_timing || m_timing->connectEnd == 0.0 || m_didReuseConnection)
        return connectStart();

    return monotonicTimeToDocumentMilliseconds(m_requestingDocument.get(), m_timing->connectEnd);
}
ddLineConnection::ddLineConnection(ddIFigure *figure1, ddIFigure *figure2):
ddPolyLineFigure()
{
	startConnector = NULL;
	endConnector = NULL;

	if(figure1)
	{
		connectStart(figure1->connectorAt(0,0));
	}

	if(figure2)
	{
		connectEnd(figure2->connectorAt(0,0));
	}
}
void PerformanceResourceTiming::buildJSONValue(V8ObjectBuilder& builder) const
{
    PerformanceEntry::buildJSONValue(builder);
    builder.addString("initiatorType", initiatorType());
    builder.addNumber("workerStart", workerStart());
    builder.addNumber("redirectStart", redirectStart());
    builder.addNumber("redirectEnd", redirectEnd());
    builder.addNumber("fetchStart", fetchStart());
    builder.addNumber("domainLookupStart", domainLookupStart());
    builder.addNumber("domainLookupEnd", domainLookupEnd());
    builder.addNumber("connectStart", connectStart());
    builder.addNumber("connectEnd", connectEnd());
    builder.addNumber("secureConnectionStart", secureConnectionStart());
    builder.addNumber("requestStart", requestStart());
    builder.addNumber("responseStart", responseStart());
    builder.addNumber("responseEnd", responseEnd());
}
Example #9
0
void BooRedisAsync::connect(const char *address, int port, int timeout_msec)
{
    if (m_connected)
        disconnect();

    boost::asio::ip::tcp::resolver resolver(*m_ioService);
    char aport[8];
    sprintf(aport,"%d",port); //resolver::query accepts string as second parameter

    boost::asio::ip::tcp::resolver::query query(address, aport);
    boost::asio::ip::tcp::resolver::iterator iterator = resolver.resolve(query);

    onLogMessage(std::string("Connecting to Redis ") + address + ":" + aport);

    m_connectionTimeout = boost::posix_time::milliseconds(timeout_msec);

    connectStart(iterator);

    if (m_ownIoService && boost::this_thread::get_id() != m_thread.get_id())
        m_thread = boost::thread(boost::bind(&boost::asio::io_service::run, m_ioService));
}
hdLineConnection::hdLineConnection(int posIdx, hdIFigure *figure1, hdIFigure *figure2):
	hdPolyLineFigure()
{
	//Check figure available positions for diagrams, add at least needed to allow initialization of the class
	int i, start;
	start = basicDisplayBox.CountPositions();
	for(i = start; i < (posIdx + 1); i++)
	{
		AddPosForNewDiagram();
	}

	startConnector = NULL;
	endConnector = NULL;

	if(figure1)
	{
		connectStart(figure1->connectorAt(posIdx, 0, 0));
	}

	if(figure2)
	{
		connectEnd(figure2->connectorAt(posIdx, 0, 0));
	}
}
Example #11
0
void BooRedisAsync::connect(boost::asio::ip::tcp::resolver::iterator iterator)
{
    connectStart(iterator);
}