Commit Graph

28 Commits (afdcd356db0a496e8916645eeebc8a03755ee0bd)

Author SHA1 Message Date
Ansariel 9f6b8484df Re-enable compiler warnings C4127, C4512 & C4706
Disable particular CRT and WinSock API warnings for functions Microsoft considers unsafe/deprecated
2024-06-11 01:56:08 +03:00
Ansariel b42f9d836b Re-enable a lot of compiler warnings for MSVC and address the C4267 "possible loss of precision" warnings 2024-06-01 15:49:26 +02:00
Andrey Lihatskiy 1b68f71348 #824 Process source files in bulk: replace tabs with spaces, convert CRLF to LF, and trim trailing whitespaces as needed 2024-04-29 07:56:09 +03:00
Dave Parks 41e32126d4 SL-17484 Unit test build fix (remove priority parameters). 2022-05-24 17:48:41 -05:00
Nat Goodspeed 663b9ff6af DRTVWR-476: pthread_self() also needs CRYPTO_THREADID_set_pointer() 2020-03-25 16:12:46 -04:00
Nat Goodspeed 3753dbd5ed DRTVWR-476: Use OpenSSL API suitable for 64-bit pointers.
In three different places we use the same pattern: an ssl_thread_id_callback()
function (a static member of LLCrashLogger, in that case) that used to be
passed to CRYPTO_set_id_callback() and therefore returned an unsigned long
representing the ID of the current thread.

But GetCurrentThread() is a HANDLE, an alias for a pointer, and you can't
uniquely cram a 64-bit pointer into an unsigned long.

Fortunately OpenSSL has a more modern API for retrieving thread ID. Pass
each ssl_thread_id_callback() function to CRYPTO_THREADID_set_callback()
instead, converting it to accept CRYPTO_THREADID* and call
CRYPTO_THREADID_set_pointer() or CRYPTO_THREADID_set_numeric() as appropriate().
2020-03-25 16:12:46 -04:00
Oz Linden 9be58e915a merge with 4.0.3-release 2016-04-04 15:53:09 -04:00
Oz Linden c8726aba30 remove execute permission from many files that should not have it 2015-11-10 09:48:56 -05:00
Rider Linden 3fdd5abf96 MAINT-5732: Issue in texture_load example and some comments regarding NoOpDeletor 2015-10-15 10:12:58 -07:00
Rider Linden 675b6a8074 Fix the sample. 2015-07-08 15:16:54 -07:00
Rider Linden fe5567639d Change HttpOptions::ptr_t to be shared_ptr<> rather than intrusive. 2015-07-08 12:09:36 -07:00
Nat Goodspeed e13259ae7a Remove a couple tests for unsigned long < 0.
clang correctly notes that such tests add nothing to the runtime behavior of a
program. Unfortunately, clang notes that in the form of a compile error.
2014-11-14 14:24:58 -05:00
Monty Brandenberg 0c20beda68 Pipelining work. Extend transfer timeout by the pipeline depth
as transfers can appear delayed with deep pipelining and more
requests in the pool.  Added bad HTTP status error (typically
getting a 0 back as HTTP status from libcurl) to the list of
retryable errors.  There's a response stream problem with libcurl
and pipelining that induces this problem.  Retrying helps but
may not be entirely safe.  Watch bug 1420 on the libcurl sourceforge
bug tracker.  Extend options of test/example program to include
un-ranged requests.  Document the excessive data transfer induced
when ranged requests are disabled.  This is an abnormal mode for
very rare users so we'll just eat that for now.
2014-09-04 16:57:44 -04:00
Monty Brandenberg 9fb96b416f Add pipelining and tracing command line options to the test program. 2014-07-03 19:44:02 -04:00
Monty Brandenberg eff651cffc SH-4312 Configuration data between viewer and llcorehttp is clumsy.
Much improved.  Unified the global and class options into a single
option list.  Implemented static and dynamic setting paths as much
as possible.  Dynamic path does require packet/RPC but otherwise
there's near unification.  Dynamic modes can't get values back yet
due to the response/notifier scheme but this doesn't bother me.
Flatten global and class options into simpler struct-like entities.
Setter/getter available on these when needed (external APIs) but code
can otherwise fiddle directly when it knows what to do.  Much duplicated
options/state removed from HttpPolicy.  Comments cleaned up.  Threads
better described and consistently mentioned in API docs.  Integration
test extended for 503 responses with Reply-After headers.
2013-07-12 15:00:24 -04:00
Monty Brandenberg fb734d621e Found the memory corruptor. String trimmer didn't have a valid
termination test.  Sheesh.  Also get some more numbers out of the
example/load test program which drives traffic.  This should
give some useful insights into how the current http throttle
works (or doesn't) with varying client demands.
2013-07-08 20:31:09 +00:00
Monty Brandenberg d8e32c58ce Update the example program so it handles meshes as well. Fix the
request feed logic to use high/low-water level logic as is done
in viewer code.
2013-07-03 15:17:26 -04:00
Monty Brandenberg 4eef1c8a2e SH-4106 Significantly upgrade the HttpHeaders interface for SSB.
Header container moves from a vector of raw lines to a vector
of string pairs representing name/value pairs in headers.  For
incoming headers, we normalize the name to lowercase and trim
it.  Values are only left-trimmed.  Outgoing headers are left
as-is.  Simple find() method for the common case, forward and
reverse iterators for those few who need to do it themselves.
The HTTP status line (e.g. 'HTTP/1.1 200 Ok') is no longer treated
as a header to be returned to caller.  Unit tests, as usual,
were a bear but they absolutely ensured outgoing HTTP header
conformance after the change.  Grunt work paid off.

LLTextureFetch was also given a second options structure
for texture fetches.  Same as the original but with header return
to caller requested.  Baked textures should use this, the other
20,000 texture fetch requests should continue to use the original.
2013-04-15 16:55:35 +00:00
Graham Madarasz bf6182daa8 Update Mac and Windows breakpad builds to latest 2013-03-29 07:50:08 -07:00
Monty Brandenberg 4d65c754d6 Tweak the example program (used as a performance tester) so that it
will run with higher connection concurrencies.  I'm using this to
test the listener queue length reporting on apaches and everything
is consistent and as expected with this change (stuck at eight before).
2012-11-27 18:09:01 +00:00
Monty Brandenberg d45b2e7cae SH-3183 Use valgrind on the library.
Using http_texture_load as the test subject, library looks clean.  Did
some better shutdown in the program itself and it looks better.  Libcurl
itself is making a lot of noise.  Adapted testrunner to run valgrind as
well but the memory allocation tester in the tools themselves grossly
interferes with Valgrind operations.
2012-07-12 17:46:53 +00:00
Monty Brandenberg bc72acbfd2 SH-3244 Syscall avoidance in HttpRequest::update() method
Well, achieved that by doing work in bulk when needed.  But
turned into some additional things.  Change timebase from
mS to uS as, well, things are headed that way.  Implement
an HttpReplyQueue::fetchAll method (advertised one, hadn't
implemented it).
2012-07-10 18:50:21 -04:00
Monty Brandenberg adce38800a Example program needs to set Accept: header to talk to Caps router. 2012-07-04 23:30:58 -04:00
Monty Brandenberg 252c297bcc Add metrics gathering utils for Mac OS X. All platforms have useful numbers now. 2012-06-16 19:03:31 -04:00
Monty Brandenberg b27bb47f3a Implement metrics collection for Linux. Next: Mac OS X. 2012-06-16 21:51:02 +00:00
Monty Brandenberg 6193ee6a33 First round of basic tuning work (shorter sleeps, larger BufferArray blocks).
Beefed up the metrics gathering in http_texture_load to get memory sizes and
cpu consumption on windows (still need to implement that on Mac & linux).
Ran runs with various idle loops with sleeps from 20 ms down to pure spinning,
varied Block allocation size from 1504 to 2^20 bytes.  2ms/2ms/65540 appears
to be a good spot under the test conditions (Win7, danu grid, client in Boston).
2012-06-16 15:50:48 -04:00
Monty Brandenberg 57575339bb Fix for linux/mac builds. 2012-06-15 13:42:13 -04:00
Monty Brandenberg 888e2587e5 Ported example (freestanding) program to drive API & generate performance numbers.
This is a command-line utility to pull content down from a service through
the llcorehttp library to produce timings and resource footprints.
2012-06-15 13:05:24 -04:00